mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 11:06:20 +00:00
commit
a9cb38e6d1
1 changed files with 1 additions and 1 deletions
|
@ -195,7 +195,7 @@ expand_env_variable(InStr, VarName, RawVarValue) ->
|
||||||
%% Use a regex to match/replace:
|
%% Use a regex to match/replace:
|
||||||
%% Given variable "FOO": match $FOO\s | $FOOeol | ${FOO}
|
%% Given variable "FOO": match $FOO\s | $FOOeol | ${FOO}
|
||||||
RegEx = io_lib:format("\\\$(~s(\\s|$)|{~s})", [VarName, VarName]),
|
RegEx = io_lib:format("\\\$(~s(\\s|$)|{~s})", [VarName, VarName]),
|
||||||
ReOpts = [global, {return, list}],
|
ReOpts = [global, {return, list}, unicode],
|
||||||
re:replace(InStr, RegEx, [VarValue, "\\2"], ReOpts)
|
re:replace(InStr, RegEx, [VarValue, "\\2"], ReOpts)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue