Browse Source

Merge pull request #633 from tsloughter/atom_branch

support atom for branch names like rebar2
pull/650/head
Fred Hebert 10 years ago
parent
commit
be1b16aea5
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/rebar_utils.erl

+ 2
- 0
src/rebar_utils.erl View File

@ -689,6 +689,8 @@ set_httpc_options(Scheme, Proxy) ->
httpc:set_options([{Scheme, {{Host, Port}, []}}], rebar). httpc:set_options([{Scheme, {{Host, Port}, []}}], rebar).
%% escape\ as\ a\ shell\? %% escape\ as\ a\ shell\?
escape_chars(Str) when is_atom(Str) ->
escape_chars(atom_to_list(Str));
escape_chars(Str) -> escape_chars(Str) ->
re:replace(Str, "([ ()?`!$])", "\\\\&", [global, {return, list}]). re:replace(Str, "([ ()?`!$])", "\\\\&", [global, {return, list}]).

Loading…
Cancel
Save