summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-04-22 21:51:11 -0500
committerTristan Sloughter <t@crashfast.com>2015-04-22 21:54:14 -0500
commite5988f69e0fc577f9c759f0907bd8b6840851035 (patch)
treee9dd6e803dde1d5c1560a56adb8674e66a51149d
parent16e9b3ffa2ddd81e26238530fd1e25a54a42b7dc (diff)
R15 support, replace unsetenv with putenv empty string
-rwxr-xr-xbootstrap2
-rw-r--r--src/rebar3.erl2
-rw-r--r--test/rebar_profiles_SUITE.erl2
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"]),