nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5363a7
)
nitg: protect for additional arguments
author
Jean Privat
<jean@pryen.org>
Fri, 14 Dec 2012 04:38:42 +0000
(23:38 -0500)
committer
Jean Privat
<jean@pryen.org>
Fri, 14 Dec 2012 04:38:42 +0000
(23:38 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>
src/nitg.nit
patch
|
blob
|
history
diff --git
a/src/nitg.nit
b/src/nitg.nit
index
24b7a3f
..
fbb09c2
100644
(file)
--- a/
src/nitg.nit
+++ b/
src/nitg.nit
@@
-39,6
+39,11
@@
if arguments.is_empty then
toolcontext.option_context.usage
return
end
+if arguments.length > 1 then
+ print "Too much arguments: {arguments.join(" ")}"
+ toolcontext.option_context.usage
+ return
+end
var progname = arguments.first
# Here we load an process all modules passed on the command line