aboutsummaryrefslogtreecommitdiffstats
path: root/src/rcl_util.erl
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2013-02-04 18:08:13 -0600
committerTristan Sloughter <[email protected]>2013-02-04 18:09:17 -0600
commit2b20716439dd0f540dbf78cc6eaabf1aa32f8583 (patch)
treea70f55d58e9a837d247b81333ea28d995aca5157 /src/rcl_util.erl
parent1207514752a0e522893c60eb6434cb4a8117a7f1 (diff)
downloadrelx-2b20716439dd0f540dbf78cc6eaabf1aa32f8583.tar.gz
relx-2b20716439dd0f540dbf78cc6eaabf1aa32f8583.tar.bz2
relx-2b20716439dd0f540dbf78cc6eaabf1aa32f8583.zip
fix: replace COnfigFile with empty string if undefined
Diffstat (limited to 'src/rcl_util.erl')
-rw-r--r--src/rcl_util.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rcl_util.erl b/src/rcl_util.erl
index 06d957d..a879c58 100644
--- a/src/rcl_util.erl
+++ b/src/rcl_util.erl
@@ -25,7 +25,8 @@
to_binary/1,
is_error/1,
error_reason/1,
- indent/1]).
+ indent/1,
+ optional_to_string/1]).
-define(ONE_LEVEL_INDENT, " ").
%%============================================================================
@@ -68,7 +69,11 @@ is_error({error, _}) ->
is_error(_) ->
false.
-
+%% @doc convert optional argument to empty string if undefined
+optional_to_string(undefined) ->
+ "";
+optional_to_string(Value) when is_list(Value) ->
+ Value.
%%%===================================================================
%%% Test Functions