Skip to content

Commit

Permalink
expanded usage message, return the more standard error code 4 when so…
Browse files Browse the repository at this point in the history
…mething breaks in cucumber-nagios
  • Loading branch information
auxesis committed Jan 16, 2010
1 parent eb9fb31 commit a61ce43
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/generators/project/bin/cucumber-nagios
@@ -1,8 +1,8 @@
#!/usr/bin/env ruby

unless ARGV[0]
puts "Usage: #{__FILE__} <feature>"
exit 99
puts "Usage: #{__FILE__} <feature> [--debug|--pretty]"
exit 4
end

__DIR__ = File.expand_path(File.dirname(__FILE__))
Expand All @@ -15,14 +15,14 @@ end

unless File.exist?(feature)
puts "Error: feature file doesn't exist!"
exit 98
exit 4
end

command_parts = []
command_parts << "#{__DIR__}/cucumber"
command_parts << "--require #{features_dir}"

if ARGV.grep(/^\-\-pretty$/).size > 0
if ARGV.include?("--pretty")
command_parts << "--format pretty"
else
command_parts << "--format Cucumber::Formatter::Nagios"
Expand Down

0 comments on commit a61ce43

Please sign in to comment.