contrib/objcwrapper: print opts errors, not just usage
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 1 Sep 2015 18:25:56 +0000 (14:25 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Thu, 3 Sep 2015 14:32:31 +0000 (10:32 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

contrib/objcwrapper/src/objcwrapper.nit

index 0b8bb72..6ec6b6b 100644 (file)
@@ -32,7 +32,9 @@ opts.add_option(opt_help, opt_output, opt_init_as_methods, opt_gcc_options)
 opts.parse args
 
 if opts.errors.not_empty or opts.rest.is_empty or opt_help.value then
-       print """
+       if opts.errors.not_empty then print_error opts.errors.join("\n")
+
+       print_error """
 Usage: objcwrapper [options] input_file [other_input_file [...]]
 Options:"""
        opts.usage