commander-rb / commander

The complete solution for Ruby command-line executables
MIT License
822 stars 74 forks source link

Add readme docs on how to handle exit status #78

Closed grosser closed 5 years ago

grosser commented 5 years ago
# to show failures to the user, use `exit` or `abort`
  c.action do |args, options|
    if args.size == 1
      puts "noooo"
      exit 1
    end
    abort "this is bad" if args.size == 2
  end
ggilder commented 5 years ago

Sorry, I'm not sure what the issue is here... please feel free to submit a PR to update the docs if that's what needs to be changed. Thanks!