diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-10-31 10:14:39 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-10-31 10:14:39 -0500 |
commit | d2be2f2b72eced609d7352cdf7e91bc815ccfbd4 (patch) | |
tree | 69eece7944e7aab6850f00a8fde653d841d396c1 /src | |
parent | 12dbed831184a20c4a7764e10f155b60316a56eb (diff) | |
parent | edfa4427a3a35f850d35b57ddec0ca765f9343a2 (diff) |
Merge pull request #898 from talentdeficit/dedup_src_dirs
dedup `src_dirs` and `extra_src_dirs` on read
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_dir.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rebar_dir.erl b/src/rebar_dir.erl index 364e197..09e3114 100644 --- a/src/rebar_dir.erl +++ b/src/rebar_dir.erl @@ -139,7 +139,7 @@ src_dirs(Opts, Default) -> Vs = proplists:get_all_values(src_dirs, ErlOpts), case lists:append([rebar_opts:get(Opts, src_dirs, []) | Vs]) of [] -> Default; - Dirs -> Dirs + Dirs -> lists:usort(Dirs) end. -spec extra_src_dirs(rebar_dict()) -> list(file:filename_all()). @@ -151,7 +151,7 @@ extra_src_dirs(Opts, Default) -> Vs = proplists:get_all_values(extra_src_dirs, ErlOpts), case lists:append([rebar_opts:get(Opts, extra_src_dirs, []) | Vs]) of [] -> Default; - Dirs -> Dirs + Dirs -> lists:usort(Dirs) end. -spec all_src_dirs(rebar_dict()) -> list(file:filename_all()). @@ -160,7 +160,7 @@ all_src_dirs(Opts) -> all_src_dirs(Opts, [], []). -spec all_src_dirs(rebar_dict(), list(file:filename_all()), list(file:filename_all())) -> list(file:filename_all()). all_src_dirs(Opts, SrcDefault, ExtraDefault) -> - src_dirs(Opts, SrcDefault) ++ extra_src_dirs(Opts, ExtraDefault). + lists:usort(src_dirs(Opts, SrcDefault) ++ extra_src_dirs(Opts, ExtraDefault)). %% given a path if that path is an ancestor of an app dir return the path relative to that %% apps outdir. if the path is not an ancestor to any app dirs but is an ancestor of the |