소스 검색

Merge pull request #253 from tsloughter/master

templater: return error, don't throw, if git or hg fail
pull/255/head
Fred Hebert 10 년 전
부모
커밋
de85f24c04
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. +3
    -3
      src/rebar_templater.erl

+ 3
- 3
src/rebar_templater.erl 파일 보기

@ -143,9 +143,9 @@ default_variables() ->
default_author_and_email() ->
%% See if we can get a git user and email to use as defaults
case rebar_utils:sh("git config --global user.name", []) of
case rebar_utils:sh("git config --global user.name", [return_on_error]) of
{ok, Name} ->
case rebar_utils:sh("git config --global user.email", []) of
case rebar_utils:sh("git config --global user.email", [return_on_error]) of
{ok, Email} ->
{string:strip(Name, both, $\n), string:strip(Email, both, $\n)};
{error, _} ->
@ -154,7 +154,7 @@ default_author_and_email() ->
end;
{error, _} ->
%% Ok, try mecurial
case rebar_utils:sh("hg showconfig ui.username", []) of
case rebar_utils:sh("hg showconfig ui.username", [return_on_error]) of
{ok, NameEmail} ->
case re:run(NameEmail, [{capture, [1,2], list}]) of
{match, [Name, Email]} ->

불러오는 중...
취소
저장