From 39357f1f16a573451cf4a1cfa691017b275bfcd1 Mon Sep 17 00:00:00 2001 From: Amelia Bellamy-Royds Date: Thu, 24 Jan 2019 10:55:36 -0700 Subject: Use double quotes in git shell command on Windows Partially reverts commit f52a115ea9d66c812f68200383d769ac300a2828 Fixes #2003 Needs tests to prevent a future regression. --- src/rebar_git_resource.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rebar_git_resource.erl') diff --git a/src/rebar_git_resource.erl b/src/rebar_git_resource.erl index c5031df..ac1316b 100644 --- a/src/rebar_git_resource.erl +++ b/src/rebar_git_resource.erl @@ -36,8 +36,8 @@ lock_(AppDir, {git, Url}) -> {ok, VsnString} = case os:type() of {win32, _} -> - rebar_utils:sh("git --git-dir='" ++ Dir ++ "/.git' " - "--work-tree='" ++ Dir ++ "' rev-parse --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", -- cgit v1.1