aboutsummaryrefslogtreecommitdiffstats
path: root/src/rcl_util.erl
diff options
context:
space:
mode:
authorEric Merritt <[email protected]>2013-02-04 18:53:09 -0800
committerEric Merritt <[email protected]>2013-02-04 18:53:09 -0800
commit60b074edbb09b43618febdf8eb50a330db2aa677 (patch)
tree372f8d01399853160384a8093328ab771137669b /src/rcl_util.erl
parent62b4f79fa00e7cc5f44621efbd4356a582fbbfb8 (diff)
parent2558618906a221ebe3cc4b2582bf59d9d7396de5 (diff)
downloadrelx-60b074edbb09b43618febdf8eb50a330db2aa677.tar.gz
relx-60b074edbb09b43618febdf8eb50a330db2aa677.tar.bz2
relx-60b074edbb09b43618febdf8eb50a330db2aa677.zip
Merge pull request #26 from tsloughter/next
make all grabs deps if deps dir does not exist
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