From e5988f69e0fc577f9c759f0907bd8b6840851035 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Wed, 22 Apr 2015 21:51:11 -0500 Subject: R15 support, replace unsetenv with putenv empty string --- bootstrap | 2 +- src/rebar3.erl | 2 ++ test/rebar_profiles_SUITE.erl | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bootstrap b/bootstrap index 8f7af30..3ed7b2b 100755 --- a/bootstrap +++ b/bootstrap @@ -25,7 +25,7 @@ main(_Args) -> os:putenv("REBAR_PROFILE", "bootstrap"), {ok, State} = rebar3:run(["compile"]), reset_env(), - os:unsetenv("REBAR_PROFILE"), + os:putenv("REBAR_PROFILE", ""), %% Build erlydtl files (a hook on compile in the default profile) and escript file DepsPaths = rebar_state:code_paths(State, all_deps), code:add_pathsa(DepsPaths), diff --git a/src/rebar3.erl b/src/rebar3.erl index fbbda51..b0cc949 100644 --- a/src/rebar3.erl +++ b/src/rebar3.erl @@ -115,6 +115,8 @@ run_aux(State, RawArgs) -> State2 = case os:getenv("REBAR_PROFILE") of false -> State; + "" -> + State; Profile -> rebar_state:apply_profiles(State, [list_to_atom(Profile)]) end, diff --git a/test/rebar_profiles_SUITE.erl b/test/rebar_profiles_SUITE.erl index 59c65e9..2d03432 100644 --- a/test/rebar_profiles_SUITE.erl +++ b/test/rebar_profiles_SUITE.erl @@ -121,7 +121,7 @@ all_deps_code_paths(Config) -> ["compile"], {ok, [{app, Name} ,{dep, "a", "1.0.0"} ,{dep, "b", "2.0.0"}]}), - os:unsetenv("REBAR_PROFILE"), + os:putenv("REBAR_PROFILE", ""), Paths = rebar_state:code_paths(State, all_deps), Path = lists:reverse(["_build", "all_deps_test", "lib", "b", "ebin"]), -- cgit v1.1