From 6714d47efb96a7717bfedefb722ff0fa3e2e6a75 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Tue, 16 Feb 2010 11:00:14 -0700 Subject: Deal properly with env vars that have multiple = in the value --- src/rebar_port_compiler.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rebar_port_compiler.erl') diff --git a/src/rebar_port_compiler.erl b/src/rebar_port_compiler.erl index fcce72b..b99ae0b 100644 --- a/src/rebar_port_compiler.erl +++ b/src/rebar_port_compiler.erl @@ -247,7 +247,7 @@ expand_vars_loop(Vars0, Count) -> case orddict:from_list(Vars) of Vars0 -> Vars0; - Vars -> + _ -> expand_vars_loop(Vars, Count-1) end. @@ -297,7 +297,7 @@ erts_dir() -> lists:concat([code:root_dir(), "/erts-", erlang:system_info(version)]). 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() -> [{"CC", "gcc"}, -- cgit v1.1