diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2018-04-27 08:41:06 -0400 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2018-04-27 08:41:06 -0400 |
commit | 81bd21b23a1f45379f006d9d441c83151e4a1765 (patch) | |
tree | fd1fd9a08f66ac658342c7fee36de8ef13e2f33b /src | |
parent | d3efb4708cd2303b506988c71ee3671a743b1da2 (diff) | |
parent | c22fde17a7a30cee5e3e5e04fab187eed2ecfe42 (diff) |
Merge branch 'feature_long_src_paths' of https://github.com/danikp/rebar3 into danikp-feature_long_src_paths
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_file_utils.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rebar_file_utils.erl b/src/rebar_file_utils.erl index bb3ca71..492d690 100644 --- a/src/rebar_file_utils.erl +++ b/src/rebar_file_utils.erl @@ -191,6 +191,10 @@ cp_r(Sources, Dest) -> {unix, _} -> EscSources = [rebar_utils:escape_chars(Src) || Src <- Sources], SourceStr = rebar_string:join(EscSources, " "), + % ensure destination exists before copying files into it + {ok, []} = rebar_utils:sh(?FMT("mkdir -p ~ts", + [rebar_utils:escape_chars(Dest)]), + [{use_stdout, false}, abort_on_error]), {ok, []} = rebar_utils:sh(?FMT("cp -Rp ~ts \"~ts\"", [SourceStr, rebar_utils:escape_double_quotes(Dest)]), [{use_stdout, false}, abort_on_error]), |