nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52064fe
)
ni: cleaned options context
author
Alexandre Terrasa
<alexandre@moz-code.org>
Sun, 23 Jun 2013 20:07:59 +0000
(16:07 -0400)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Sun, 23 Jun 2013 20:07:59 +0000
(16:07 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
src/ni.nit
patch
|
blob
|
history
diff --git
a/src/ni.nit
b/src/ni.nit
index
8d09f1e
..
76a40b6
100644
(file)
--- a/
src/ni.nit
+++ b/
src/ni.nit
@@
-36,9
+36,10
@@
class NitIndex
init(toolcontext: ToolContext) do
# We need a model to collect stufs
self.toolcontext = toolcontext
+ self.toolcontext.option_context.options.clear
self.arguments = toolcontext.option_context.rest
- if arguments.length > 2 then
+ if arguments.is_empty or arguments.length > 2 then
print "usage: ni path/to/module.nit [expression]"
toolcontext.option_context.usage
exit(1)