diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2018-06-08 19:30:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-08 19:30:38 -0400 |
commit | ca36f30fe302c8a23f2e46ec077304cbb208999c (patch) | |
tree | fcb132d8c5c42dd87b7024121bb60e58fd46d0ca /src/rebar_utils.erl | |
parent | 2c10bc97248e78e2aef1cdb8f87dd300ce954cca (diff) | |
parent | d1fc937515b312c1e5129e9e435e5b462f34b874 (diff) |
Merge pull request #1807 from starbelly/1645-erl_files_first_string_crashes_rebar3
Resolve string vs list crashing rebar3
Diffstat (limited to 'src/rebar_utils.erl')
-rw-r--r-- | src/rebar_utils.erl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index 604abb8..2ded481 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -73,7 +73,8 @@ list_dir/1, user_agent/0, reread_config/1, - get_proxy_auth/0]). + get_proxy_auth/0, + is_list_of_strings/1]). %% for internal use only @@ -919,3 +920,11 @@ get_proxy_auth() -> undefined -> []; {ok, ProxyAuth} -> ProxyAuth end. + +-spec rebar_utils:is_list_of_strings(term()) -> boolean(). +is_list_of_strings(List) when not is_list(hd(List)) -> + false; +is_list_of_strings(List) when is_list(hd(List)) -> + true; +is_list_of_strings(List) when is_list(List) -> + true. |