diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2016-06-28 16:21:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-28 16:21:16 -0400 |
commit | 90f9b0e6197e25cf256c7952a54312ea577dbd4c (patch) | |
tree | c8a0e135e1e9a30c216f2acc703f3a2f53741d82 | |
parent | feed75ca91423be8eaf49e1db57a5ef605238aed (diff) | |
parent | c86201b85b7f426f8eaca31d95ee39a71fab9faf (diff) |
Merge pull request #1251 from srstrong/master
Fixes for windows environment: 1) copy empty directories when cloning…
-rw-r--r-- | src/rebar_file_utils.erl | 4 | ||||
-rw-r--r-- | src/rebar_git_resource.erl | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/rebar_file_utils.erl b/src/rebar_file_utils.erl index 667be62..104c047 100644 --- a/src/rebar_file_utils.erl +++ b/src/rebar_file_utils.erl @@ -177,11 +177,11 @@ mv(Source, Dest) -> {win32, _} -> Cmd = case filelib:is_dir(Source) of true -> - ?FMT("robocopy /move /s \"~s\" \"~s\" 1> nul", + ?FMT("robocopy /move /e \"~s\" \"~s\" 1> nul", [rebar_utils:escape_double_quotes(filename:nativename(Source)), rebar_utils:escape_double_quotes(filename:nativename(Dest))]); false -> - ?FMT("robocopy /move /s \"~s\" \"~s\" \"~s\" 1> nul", + ?FMT("robocopy /move /e \"~s\" \"~s\" \"~s\" 1> nul", [rebar_utils:escape_double_quotes(filename:nativename(filename:dirname(Source))), rebar_utils:escape_double_quotes(filename:nativename(Dest)), rebar_utils:escape_double_quotes(filename:basename(Source))]) diff --git a/src/rebar_git_resource.erl b/src/rebar_git_resource.erl index f0f5f03..acb9ec0 100644 --- a/src/rebar_git_resource.erl +++ b/src/rebar_git_resource.erl @@ -22,7 +22,7 @@ lock(AppDir, {git, Url}) -> {ok, VsnString} = case os:type() of {win32, _} -> - rebar_utils:sh("git rev-parse --git-dir=\"" ++ Dir ++ "/.git\" --work-tree=\"" ++ Dir ++ "\" --verify HEAD", + rebar_utils:sh("git --git-dir=\"" ++ Dir ++ "/.git\" --work-tree=\"" ++ Dir ++ "\" rev-parse --verify HEAD", [{use_stdout, false}, {debug_abort_on_error, AbortMsg}]); _ -> rebar_utils:sh("git --git-dir=\"" ++ Dir ++ "/.git\" rev-parse --verify HEAD", |