瀏覽代碼

Fix missing 'cd' that depended on cwd changes

pull/606/head
Fred Hebert 9 年之前
父節點
當前提交
0c53658087
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. +3
    -1
      src/rebar_git_resource.erl

+ 3
- 1
src/rebar_git_resource.erl 查看文件

@ -133,9 +133,10 @@ collect_default_refcount(Dir) ->
{ok, RawCount} = {ok, RawCount} =
case Tag of case Tag of
undefined -> 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", {ok, PatchLines} = rebar_utils:sh("git rev-list HEAD",
[{use_stdout, false}, [{use_stdout, false},
{cd, Dir},
{debug_abort_on_error, AbortMsg2}]), {debug_abort_on_error, AbortMsg2}]),
rebar_utils:line_count(PatchLines); rebar_utils:line_count(PatchLines);
_ -> _ ->
@ -164,6 +165,7 @@ get_patch_count(Dir, RawRef) ->
[Ref]), [Ref]),
{ok, PatchLines} = rebar_utils:sh(Cmd, {ok, PatchLines} = rebar_utils:sh(Cmd,
[{use_stdout, false}, [{use_stdout, false},
{cd, Dir},
{debug_abort_on_error, AbortMsg}]), {debug_abort_on_error, AbortMsg}]),
rebar_utils:line_count(PatchLines). rebar_utils:line_count(PatchLines).

Loading…
取消
儲存