diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2017-02-19 11:26:35 -0500 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2017-02-19 11:26:35 -0500 |
commit | d80c3f4da10857d16315d10ecaa5fe0f2f08c961 (patch) | |
tree | cfbbb9c56b284ad71a9e7b1043ce73f3129048ec /src | |
parent | c64c88f262abaad677042d8eab0c41ff54af4b7b (diff) |
For convenience add appinfo default src_dir lookup
This makes rebar_prv_install_deps able to support more src_dir configs
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_app_discover.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rebar_app_discover.erl b/src/rebar_app_discover.erl index 0396be1..66319a4 100644 --- a/src/rebar_app_discover.erl +++ b/src/rebar_app_discover.erl @@ -246,7 +246,11 @@ find_app(AppDir, Validate) -> -spec find_app(rebar_app_info:t(), file:filename_all(), valid | invalid | all) -> {true, rebar_app_info:t()} | false. find_app(AppInfo, AppDir, Validate) -> - find_app(AppInfo, AppDir, ["src"], Validate). + %% if no src dir is passed, figure it out from the app info, with a default + %% of src/ + AppOpts = rebar_app_info:opts(AppInfo), + SrcDirs = rebar_dir:src_dirs(AppOpts, ["src"]), + find_app(AppInfo, AppDir, SrcDirs, Validate). %% @doc check that a given app in a directory is there, and whether it's %% valid or not based on the second argument. The third argument includes |