summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-03-08 18:05:37 -0500
committerTristan Sloughter <t@crashfast.com>2015-03-08 18:06:03 -0500
commitcb1a5b945c30b17a1949234d86c739fc032219ee (patch)
tree79df6c4e7bc1b9f7df29d9ab2214ad2da841b563 /src
parentd020c0089d932741d9618e790601c23d9dcab3f5 (diff)
templater: return error, don't throw, if git or hg fail
Diffstat (limited to 'src')
-rw-r--r--src/rebar_templater.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rebar_templater.erl b/src/rebar_templater.erl
index 588f5b2..824d376 100644
--- a/src/rebar_templater.erl
+++ b/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]} ->