Deal properly with env vars that have multiple = in the value

This commit is contained in:
Dave Smith 2010-02-16 11:00:14 -07:00
parent 1f6d861aba
commit 6714d47efb

View file

@ -247,7 +247,7 @@ expand_vars_loop(Vars0, Count) ->
case orddict:from_list(Vars) of case orddict:from_list(Vars) of
Vars0 -> Vars0 ->
Vars0; Vars0;
Vars -> _ ->
expand_vars_loop(Vars, Count-1) expand_vars_loop(Vars, Count-1)
end. end.
@ -297,7 +297,7 @@ erts_dir() ->
lists:concat([code:root_dir(), "/erts-", erlang:system_info(version)]). lists:concat([code:root_dir(), "/erts-", erlang:system_info(version)]).
os_env() -> os_env() ->
[list_to_tuple(re:split(S, "=", [{return, list}])) || S <- os:getenv()]. [list_to_tuple(re:split(S, "=", [{return, list}, {parts, 2}])) || S <- os:getenv()].
default_env() -> default_env() ->
[{"CC", "gcc"}, [{"CC", "gcc"},