diff options
author | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-02-25 20:57:35 -0600 |
---|---|---|
committer | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-02-25 20:57:35 -0600 |
commit | 5396c5b7fec5655d4b07cfa877318be70a4c61c8 (patch) | |
tree | e0b1bc6d6490ce2a22b54d6fabf9127e474f53e5 /src | |
parent | 456b9ae8eaeae5a1fd3d103f182807c2bdba7442 (diff) | |
parent | a8ceafbf4ca19de403c4c4b6df27e6faeb8f635b (diff) |
Merge pull request #188 from ferd/fix-env-var-expansion
Port env var expension fix from rebar2
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_utils.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index ab5167f..0c95c69 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -293,7 +293,7 @@ expand_env_variable(InStr, VarName, RawVarValue) -> 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]), + RegEx = io_lib:format("\\\$(~s(\\W|$)|{~s})", [VarName, VarName]), re:replace(InStr, RegEx, [VarValue, "\\2"], ReOpts) end. |