summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-07-09 21:20:11 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-07-09 21:20:11 -0500
commit83fa49ed3c478aa8dcc968d07d8852e247c98ca9 (patch)
tree386115083b622425fe0822cfa7c0c753e2368e07 /src
parent749bf58260a31ff453adedecff93a83dbf66a750 (diff)
parent0c5365808705bdead9a30f029fd85b205dfc05cf (diff)
Merge pull request #606 from ferd/more-git-cding
Fix missing 'cd' that depended on cwd changes
Diffstat (limited to 'src')
-rw-r--r--src/rebar_git_resource.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rebar_git_resource.erl b/src/rebar_git_resource.erl
index e2f3f69..a0690bf 100644
--- a/src/rebar_git_resource.erl
+++ b/src/rebar_git_resource.erl
@@ -133,9 +133,10 @@ collect_default_refcount(Dir) ->
{ok, RawCount} =
case Tag of
undefined ->
- AbortMsg2 = "Getting rev-list of git depedency failed in " ++ rebar_dir:get_cwd(),
+ AbortMsg2 = "Getting rev-list of git depedency failed in " ++ Dir,
{ok, PatchLines} = rebar_utils:sh("git rev-list HEAD",
[{use_stdout, false},
+ {cd, Dir},
{debug_abort_on_error, AbortMsg2}]),
rebar_utils:line_count(PatchLines);
_ ->
@@ -164,6 +165,7 @@ get_patch_count(Dir, RawRef) ->
[Ref]),
{ok, PatchLines} = rebar_utils:sh(Cmd,
[{use_stdout, false},
+ {cd, Dir},
{debug_abort_on_error, AbortMsg}]),
rebar_utils:line_count(PatchLines).