summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-07-21 19:51:36 -0500
committerTristan Sloughter <t@crashfast.com>2015-07-21 19:51:48 -0500
commit6fad6efe686ffdddaccc73613e0726a755d3bc99 (patch)
tree443f6b465541de0b99b92dcb7c653386716f0eb9
parent6f3d75278ff3894b503142227df98e983b0bdbaa (diff)
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}]).