summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rebar_utils.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index 9c7c064..2731761 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -191,12 +191,12 @@ expand_env_variable(InStr, VarName, RawVarValue) ->
%% No variables to expand
InStr;
_ ->
- VarValue = re:replace(RawVarValue, "\\\\", "\\\\\\\\", [global, unicode]),
+ ReOpts = [global, unicode],
+ 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)
+ re:replace(InStr, RegEx, [VarValue, "\\2"], ReOpts ++ [{return, list}])
end.
vcs_vsn(Config, Vcs, Dir) ->