summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2015-07-25 22:04:41 +0100
committerFred Hebert <mononcqc@ferd.ca>2015-07-25 22:04:41 +0100
commitbe1b16aea5650b57e28a77db044be27096b60c64 (patch)
treec10c5b76bf5f85a60e192afeb43ba089dea825a2
parent5cbc22c45d09f49d3867d71f4aac78326b9a8493 (diff)
parent6fad6efe686ffdddaccc73613e0726a755d3bc99 (diff)
Merge pull request #633 from tsloughter/atom_branch
support atom for branch names like rebar2
-rw-r--r--src/rebar_utils.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index 6eb4f4b..c8b9e10 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -689,6 +689,8 @@ set_httpc_options(Scheme, Proxy) ->
httpc:set_options([{Scheme, {{Host, Port}, []}}], rebar).
%% escape\ as\ a\ shell\?
+escape_chars(Str) when is_atom(Str) ->
+ escape_chars(atom_to_list(Str));
escape_chars(Str) ->
re:replace(Str, "([ ()?`!$])", "\\\\&", [global, {return, list}]).