Permalink
Browse files

Deal with empty argument list when invoked via main/1

  • Loading branch information...
dizzyd committed Jan 9, 2011
1 parent 0a6e347 commit 940db8886a670c0561f3e3aaf24c3b2b70a64611
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/setup_gen.erl
View
@@ -19,6 +19,9 @@
run/1, % when called from within erlang
help/0]). % prints help text.
+main([]) ->
+ help(),
+ halt(1);
main([H]) when H=="-h"; H=="-help" ->
help(),
halt(0);

0 comments on commit 940db88

Please sign in to comment.