aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2015-05-16 13:03:04 -0500
committerTristan Sloughter <[email protected]>2015-05-16 13:03:04 -0500
commit3294dd5ae6af61ec34de44ea5f8d8bd4904d74dc (patch)
treeb08022b0d300f712075cb068805698dcf90aa90a
parent693dcb8ca37b6d839d82197eacac86681c427dc7 (diff)
downloadrelx-3294dd5ae6af61ec34de44ea5f8d8bd4904d74dc.tar.gz
relx-3294dd5ae6af61ec34de44ea5f8d8bd4904d74dc.tar.bz2
relx-3294dd5ae6af61ec34de44ea5f8d8bd4904d74dc.zip
don't return value as string if not a printable string
-rw-r--r--src/rlx_util.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rlx_util.erl b/src/rlx_util.erl
index 2251b4f..8a54ae6 100644
--- a/src/rlx_util.erl
+++ b/src/rlx_util.erl
@@ -133,7 +133,12 @@ is_error(_) ->
optional_to_string(undefined) ->
"";
optional_to_string(Value) when is_list(Value) ->
- Value.
+ case io_lib:printable_list(Value) of
+ true ->
+ Value;
+ false ->
+ ""
+ end.
%% @doc expand wildcards and names in the given paths
-spec wildcard_paths([file:filename_all()]) -> [string()].