summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2013-06-24 12:20:37 -0700
committerDave Smith <dizzyd@dizzyd.com>2013-06-24 12:20:37 -0700
commitbe8b022a827b795b3d1416a22719217e6ef791a3 (patch)
treee904f60a2d3425ff51cc847838e3c9bbe62a3990
parent271299a4e9f6ac96a4b539c1e7df6fec4b6690f6 (diff)
parent091405bce7a59769a86fcbf8e44602c05b7082a1 (diff)
Merge pull request #102 from pragdave/master
Add one more "unicode" option in expand_env_variable—I have a bullet in my prompt that was blowing it up
-rw-r--r--src/rebar_utils.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index fd93f98..64ac4a9 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -191,11 +191,11 @@ expand_env_variable(InStr, VarName, RawVarValue) ->
%% No variables to expand
InStr;
_ ->
- VarValue = re:replace(RawVarValue, "\\\\", "\\\\\\\\", [global]),
+ ReOpts = [global, unicode, {return, list}],
+ VarValue = re:replace(RawVarValue, "\\\\", "\\\\\\\\", ReOpts),
%% Use a regex to match/replace:
%% Given variable "FOO": match $FOO\s | $FOOeol | ${FOO}
RegEx = io_lib:format("\\\$(~s(\\s|$)|{~s})", [VarName, VarName]),
- ReOpts = [global, {return, list}, unicode],
re:replace(InStr, RegEx, [VarValue, "\\2"], ReOpts)
end.