summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralisdair sullivan <alisdairsullivan@yahoo.ca>2017-02-26 11:02:56 -0600
committerGitHub <noreply@github.com>2017-02-26 11:02:56 -0600
commitb810909314731b2761bc23d607baadea2db01ed4 (patch)
tree6d8ab99f014a06c8f5f2c22df8496322e2e6331d /src
parent1376967687921b25a39c876edc373331956f3e7c (diff)
parent0bc0aeba9c19531025967862cde7b9e32d7bc300 (diff)
Merge pull request #1497 from ferd/rebar-config-override-root
REBAR_CONFIG impacts file project root only
Diffstat (limited to 'src')
-rw-r--r--src/rebar3.erl2
-rw-r--r--src/rebar_config.erl10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/rebar3.erl b/src/rebar3.erl
index 56bf3e8..5c593cc 100644
--- a/src/rebar3.erl
+++ b/src/rebar3.erl
@@ -176,7 +176,7 @@ init_config() ->
Verbosity = log_level(),
ok = rebar_log:init(command_line, Verbosity),
- Config = rebar_config:consult(),
+ Config = rebar_config:consult_root(),
Config1 = rebar_config:merge_locks(Config, rebar_config:consult_lock_file(?LOCK_FILE)),
%% If $HOME/.config/rebar3/rebar.config exists load and use as global config
diff --git a/src/rebar_config.erl b/src/rebar_config.erl
index 97e27ab..82ff0d9 100644
--- a/src/rebar_config.erl
+++ b/src/rebar_config.erl
@@ -26,7 +26,7 @@
%% -------------------------------------------------------------------
-module(rebar_config).
--export([consult/0
+-export([consult_root/0
,consult/1
,consult_app_file/1
,consult_file/1
@@ -46,15 +46,15 @@
%% Public API
%% ===================================================================
-%% @doc reads the default config file.
--spec consult() -> [any()].
-consult() ->
+%% @doc reads the default config file at the top of a full project
+-spec consult_root() -> [any()].
+consult_root() ->
consult_file(config_file()).
%% @doc reads the default config file in a given directory.
-spec consult(file:name()) -> [any()].
consult(Dir) ->
- consult_file(filename:join(Dir, config_file())).
+ consult_file(filename:join(Dir, ?DEFAULT_CONFIG_FILE)).
%% @doc reads a given app file, including the `.script' variations,
%% if any can be found.