Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

External deps_dir should have higher priority than the config one #100

Merged
merged 1 commit into from

2 participants

@josevalim

The external deps_dir should have higher priority because
it is used by scripts and other build tools to set up the
location of the dependencies. This commit ensures that,
even if a project has set deps_dir in its config file has
lower preference than the command line one.

@josevalim josevalim External deps_dir should have higher priority than the config one
The external deps_dir should have higher priority because
it is used by scripts and other build tools to set up the
location of the dependencies. This commit ensures that,
even if a project has set deps_dir in its config file has
lower preference than the command line one.
e467642
@dizzyd
Owner

I'm going to merge this PR, because I think it's right that the global should override local for this variable, but am fully aware that rebar is not consistent in all cases with this. :)

@dizzyd dizzyd merged commit 3a95596 into rebar:master

1 check passed

Details default The Travis CI build passed
@josevalim josevalim deleted the unknown repository branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 17, 2013
  1. @josevalim

    External deps_dir should have higher priority than the config one

    josevalim authored
    The external deps_dir should have higher priority because
    it is used by scripts and other build tools to set up the
    location of the dependencies. This commit ensures that,
    even if a project has set deps_dir in its config file has
    lower preference than the command line one.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/rebar_deps.erl
View
5 src/rebar_deps.erl
@@ -241,10 +241,11 @@ info_help(Description) ->
%% Added because of trans deps,
%% need all deps in same dir and should be the one set by the root rebar.config
+%% In case one is given globally, it has higher priority
%% Sets a default if root config has no deps_dir set
set_shared_deps_dir(Config, []) ->
- GlobalDepsDir = rebar_config:get_global(Config, deps_dir, "deps"),
- DepsDir = rebar_config:get_local(Config, deps_dir, GlobalDepsDir),
+ LocalDepsDir = rebar_config:get_local(Config, deps_dir, "deps"),
+ DepsDir = rebar_config:get_global(Config, deps_dir, LocalDepsDir),
rebar_config:set_xconf(Config, deps_dir, DepsDir);
set_shared_deps_dir(Config, _DepsDir) ->
Config.
Something went wrong with that request. Please try again.