aboutsummaryrefslogtreecommitdiffstats
path: root/src/rcl_state.erl
diff options
context:
space:
mode:
authorEric B Merritt <[email protected]>2013-02-05 16:49:41 -0800
committerEric B Merritt <[email protected]>2013-02-05 17:10:45 -0800
commit26851a2e1c59124dea325e9a38cda25da463839a (patch)
treed160929e396a69086de2b5ac9af1685c15270ffc /src/rcl_state.erl
parent882d4fbfe65dfc812d3de9d55647f9fb468be4b4 (diff)
downloadrelx-26851a2e1c59124dea325e9a38cda25da463839a.tar.gz
relx-26851a2e1c59124dea325e9a38cda25da463839a.tar.bz2
relx-26851a2e1c59124dea325e9a38cda25da463839a.zip
fix config issues with undefined config
Diffstat (limited to 'src/rcl_state.erl')
-rw-r--r--src/rcl_state.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rcl_state.erl b/src/rcl_state.erl
index ecf3115..149b5ab 100644
--- a/src/rcl_state.erl
+++ b/src/rcl_state.erl
@@ -65,7 +65,7 @@
action :: atom(),
output_dir :: file:name(),
lib_dirs=[] :: [file:name()],
- config_file=[] :: file:filename(),
+ config_file=[] :: file:filename() | undefined,
goals=[] :: [rcl_depsolver:constraint()],
providers = [] :: [rcl_provider:t()],
available_apps = [] :: [rcl_app_info:t()],
@@ -102,7 +102,7 @@ new(PropList, Target)
#state_t{log = proplists:get_value(log, PropList, rcl_log:new(error)),
output_dir=proplists:get_value(output_dir, PropList, ""),
lib_dirs=proplists:get_value(lib_dirs, PropList, ""),
- config_file=proplists:get_value(config, PropList, ""),
+ config_file=proplists:get_value(config, PropList, undefined),
action = Target,
goals=proplists:get_value(goals, PropList, []),
providers = [],
@@ -143,11 +143,11 @@ lib_dirs(#state_t{lib_dirs=LibDir}) ->
goals(#state_t{goals=TS}) ->
TS.
--spec config_file(t()) -> file:filename().
+-spec config_file(t()) -> file:filename() | undefined.
config_file(#state_t{config_file=ConfigFiles}) ->
ConfigFiles.
--spec config_file(t(), file:filename()) -> t().
+-spec config_file(t(), file:filename() | undefined) -> t().
config_file(State, ConfigFiles) ->
State#state_t{config_file=ConfigFiles}.