]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
require arg for `leap inspect`
authorelijah <elijah@riseup.net>
Fri, 14 Dec 2012 04:46:53 +0000 (20:46 -0800)
committerelijah <elijah@riseup.net>
Fri, 14 Dec 2012 04:46:53 +0000 (20:46 -0800)
lib/leap_cli/commands/inspect.rb

index 025d244172342ed534180e458bb49736f2848000..1856ad6450c0a60d0116930cfdf0456934442e56 100644 (file)
@@ -1,9 +1,11 @@
 module LeapCli; module Commands
 
   desc 'Prints information about a file or node.'
+  arg_name '<file-or-node>', :optional => false
   command :inspect do |c|
     c.action do |global_options,options,args|
       object = args.first
+      assert! object, 'A file path or node name is required'
       method = inspection_method(object)
       if method && defined?(method)
         self.send(method, object, options)