diff options
author | Dave Smith <dizzyd@dizzyd.com> | 2012-12-02 09:52:29 -0800 |
---|---|---|
committer | Dave Smith <dizzyd@dizzyd.com> | 2012-12-02 09:52:29 -0800 |
commit | 71c717d86bd92cce0111cb7c4975039784f74a71 (patch) | |
tree | d7f5712df9e6ac821d85a2b8af2ef1ee6543fd61 /src | |
parent | 65ed9d9811ad80dd516dbb1059feab284011d21f (diff) | |
parent | 61c353dcfdafb87107cc5472709d229c26a8cb6c (diff) |
Merge pull request #26 from l4u/patch-1
Support environment vars with unicode characters
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_port_compiler.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rebar_port_compiler.erl b/src/rebar_port_compiler.erl index 70ee308..06a79bc 100644 --- a/src/rebar_port_compiler.erl +++ b/src/rebar_port_compiler.erl @@ -399,7 +399,7 @@ expand_vars_loop([], Recurse, Vars, Count) -> expand_vars_loop(Recurse, [], Vars, Count-1); expand_vars_loop([{K, V} | Rest], Recurse, Vars, Count) -> %% Identify the variables that need expansion in this value - ReOpts = [global, {capture, all_but_first, list}], + ReOpts = [global, {capture, all_but_first, list}, unicode], case re:run(V, "\\\${?(\\w+)}?", ReOpts) of {match, Matches} -> %% Identify the unique variables that need to be expanded @@ -472,8 +472,8 @@ erts_dir() -> lists:concat([code:root_dir(), "/erts-", erlang:system_info(version)]). os_env() -> - Os = [list_to_tuple(re:split(S, "=", [{return, list}, {parts, 2}])) || - S <- os:getenv()], + ReOpts = [{return, list}, {parts, 2}, unicode], + Os = [list_to_tuple(re:split(S, "=", ReOpts)) || S <- os:getenv()], %% Drop variables without a name (win32) [T1 || {K, _V} = T1 <- Os, K =/= []]. |