From 26851a2e1c59124dea325e9a38cda25da463839a Mon Sep 17 00:00:00 2001 From: Eric B Merritt Date: Tue, 5 Feb 2013 16:49:41 -0800 Subject: fix config issues with undefined config --- src/rcl_state.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/rcl_state.erl') 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}. -- cgit v1.2.3