diff options
author | Dmitry <dmitry.polyanovsky@gmail.com> | 2018-04-22 09:09:01 +0300 |
---|---|---|
committer | Dmitry <dmitry.polyanovsky@gmail.com> | 2018-04-22 09:09:01 +0300 |
commit | b3f99aa42fcbeffa8751df308cb194a470cd0e80 (patch) | |
tree | 846275de39e37c561e2900eb594d05ab88b87223 /src | |
parent | c50bb13a69eb508bb268f6975cd496a635ad7c64 (diff) |
ensure Dest exists before copying to it
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_file_utils.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rebar_file_utils.erl b/src/rebar_file_utils.erl index bb3ca71..0dbc40a 100644 --- a/src/rebar_file_utils.erl +++ b/src/rebar_file_utils.erl @@ -191,8 +191,8 @@ cp_r(Sources, Dest) -> {unix, _} -> EscSources = [rebar_utils:escape_chars(Src) || Src <- Sources], SourceStr = rebar_string:join(EscSources, " "), - {ok, []} = rebar_utils:sh(?FMT("cp -Rp ~ts \"~ts\"", - [SourceStr, rebar_utils:escape_double_quotes(Dest)]), + {ok, []} = rebar_utils:sh(?FMT("mkdir -p \"~ts\" && cp -Rp ~ts $_", + [rebar_utils:escape_double_quotes(Dest), SourceStr]), [{use_stdout, false}, abort_on_error]), ok; {win32, _} -> |