Permalink
Browse files

vert: fix switch w/o args as final option

  • Loading branch information...
1 parent 819b14d commit 6479a96f863c493878545ab6e2083cf22045dcf3 @msantos committed Aug 25, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 bin/vert
View
@@ -202,6 +202,8 @@ getopt([], Acc) ->
lists:reverse(Acc);
getopt(["--" ++ Key, "--" ++ _ = Val | Rest], Acc) ->
getopt([Val|Rest], [{Key, true}|Acc]);
+getopt(["--" ++ Key], Acc) ->
+ getopt([], [{Key, true}|Acc]);
getopt(["--" ++ Key, Val | Rest], Acc) ->
getopt(Rest, [{Key, Val}|Acc]).

0 comments on commit 6479a96

Please sign in to comment.