diff options
author | Tristan Sloughter <[email protected]> | 2014-02-16 18:58:46 -0600 |
---|---|---|
committer | Tristan Sloughter <[email protected]> | 2014-03-06 11:01:15 -0600 |
commit | 9168632da88fe32af46e1ed8dd6e6b22b4094593 (patch) | |
tree | 55f3d0bcd656c1ad4190ffbcbc7fab755ac74d14 /src | |
parent | fcd5116e7ae5bc40d6542b080f2b0f66707faf54 (diff) | |
download | relx-9168632da88fe32af46e1ed8dd6e6b22b4094593.tar.gz relx-9168632da88fe32af46e1ed8dd6e6b22b4094593.tar.bz2 relx-9168632da88fe32af46e1ed8dd6e6b22b4094593.zip |
by default do not do app and release discovery under output dir
Diffstat (limited to 'src')
-rw-r--r-- | src/rlx_dscv_util.erl | 29 | ||||
-rw-r--r-- | src/rlx_prv_assembler.erl | 2 |
2 files changed, 18 insertions, 13 deletions
diff --git a/src/rlx_dscv_util.erl b/src/rlx_dscv_util.erl index 6cfea81..a4a265c 100644 --- a/src/rlx_dscv_util.erl +++ b/src/rlx_dscv_util.erl @@ -115,19 +115,24 @@ discover_real_symlink_dir(ProcessDir, File) -> ok = file:set_cwd(File), {ok, ActualRealDir} = file:get_cwd(), ok = file:set_cwd(CurCwd), - lists:prefix(iolist_to_list(filename:absname(ActualRealDir)), - iolist_to_list(filename:absname(File))), - case ProcessDir(File, directory) of - {ok, Result, true} -> - [{ok, Result} | recurse(ProcessDir, File)]; - {noresult, true} -> - recurse(ProcessDir, File); - {ok, Result, _} -> - [{ok, Result}]; - {noresult, _} -> + case lists:prefix(iolist_to_list(filename:absname(ActualRealDir)), + iolist_to_list(filename:absname(File))) of + true -> + %% Ignore cycles []; - Err = {error, _} -> - [Err] + false -> + case ProcessDir(File, directory) of + {ok, Result, true} -> + [{ok, Result} | recurse(ProcessDir, File)]; + {noresult, true} -> + recurse(ProcessDir, File); + {ok, Result, _} -> + [{ok, Result}]; + {noresult, _} -> + []; + Err = {error, _} -> + [Err] + end end. recurse(ProcessDir, File) -> diff --git a/src/rlx_prv_assembler.erl b/src/rlx_prv_assembler.erl index a21dd3d..d3ab2f6 100644 --- a/src/rlx_prv_assembler.erl +++ b/src/rlx_prv_assembler.erl @@ -376,7 +376,7 @@ copy_or_generate_sys_config_file(State, RelDir) -> %% @doc copy config/sys.config or generate one to releases/VSN/sys.config -spec copy_or_symlink_config_file(rlx_state:t(), file:name(), file:name()) -> - {ok, rlx_state:t()} | relx:error(). + ok. copy_or_symlink_config_file(State, ConfigPath, RelConfPath) -> ensure_not_exist(RelConfPath), case rlx_state:dev_mode(State) of |