aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-12-13 20:46:53 -0800
committerelijah <elijah@riseup.net>2012-12-13 20:46:53 -0800
commit9c4947ccf2ddd6d60b0baedb8d097721864b4eb2 (patch)
tree3689416c434cb03325e291f8e8052d7ae8185c50
parent9e06d816ae428fb0fdaa858dd350777627997cba (diff)
downloadleap_cli-9c4947ccf2ddd6d60b0baedb8d097721864b4eb2.tar.gz
leap_cli-9c4947ccf2ddd6d60b0baedb8d097721864b4eb2.tar.bz2
require arg for `leap inspect`
-rw-r--r--lib/leap_cli/commands/inspect.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/leap_cli/commands/inspect.rb b/lib/leap_cli/commands/inspect.rb
index 025d244..1856ad6 100644
--- a/lib/leap_cli/commands/inspect.rb
+++ b/lib/leap_cli/commands/inspect.rb
@@ -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)