Browse files

Do not let check_edown halt a build if init:get_plain_arguments() is …

…empty

This may happen in case if rebar is used as a library.
  • Loading branch information...
1 parent 6f7f6c3 commit 4fcabb5c784e5f24719e48e895715ee6bf0dacb2 @proger proger committed Sep 2, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 priv/check_edown.script
View
6 priv/check_edown.script
@@ -4,7 +4,11 @@
%% To build docs, call `rebar get-deps doc`
%% Assumes that the rebar config is bound to CONFIG
-[_|Args] = init:get_plain_arguments(). % rebar 'commands' and options
+Args = case init:get_plain_arguments() of
+ [_|A] -> A; % rebar 'commands' and options
+ _ -> []
+end.
+
case lists:member("doc", Args) of
false ->
{ok,C1} = file:script(filename:join(filename:dirname(SCRIPT),

0 comments on commit 4fcabb5

Please sign in to comment.