From: Alexandre Terrasa Date: Sun, 23 Jun 2013 20:07:59 +0000 (-0400) Subject: ni: cleaned options context X-Git-Tag: v0.6.1~73^2~5^2~74 X-Git-Url: http://nitlanguage.org ni: cleaned options context Signed-off-by: Alexandre Terrasa --- diff --git a/src/ni.nit b/src/ni.nit index 8d09f1e..76a40b6 100644 --- 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)