summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon <jonathn@github.com>2016-06-18 03:35:53 +0200
committerJon <jonathn@github.com>2016-06-18 04:01:53 +0200
commit391f3b3bec6283866fec8b16e128488de5205640 (patch)
treee5d7663af90db87dd6749e00ad8113be0c9d636c
parentac69558087fdf9215581c8deb759bd8e3e8ef70d (diff)
Let DEBUG="" and QUIET="" mean disable the option
Setting DEBUG/QUIET environment variable to the empty string now acts the same as unsetting it. Unsetting is not always easy/possible.
-rw-r--r--src/rebar3.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rebar3.erl b/src/rebar3.erl
index 82b4472..d3ea15f 100644
--- a/src/rebar3.erl
+++ b/src/rebar3.erl
@@ -221,10 +221,10 @@ set_options(State, {Options, NonOptArgs}) ->
%%
log_level() ->
case os:getenv("QUIET") of
- false ->
+ Q when Q == false; Q == "" ->
DefaultLevel = rebar_log:default_level(),
case os:getenv("DEBUG") of
- false ->
+ D when D == false; D == "" ->
DefaultLevel;
_ ->
DefaultLevel + 3