diff options
Diffstat (limited to 'bin/facter')
-rwxr-xr-x | bin/facter | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -8,17 +8,15 @@ require 'getoptlong' require 'facter' -Facter.load - $debug = 0 config = nil result = GetoptLong.new( - [ "--version", "-v", GetoptLong::NO_ARGUMENT ], - [ "--help", "-h", GetoptLong::NO_ARGUMENT ], - [ "--debug", "-d", GetoptLong::NO_ARGUMENT ], - [ "--config", "-c", GetoptLong::REQUIRED_ARGUMENT ] + [ "--version", "-v", GetoptLong::NO_ARGUMENT ], + [ "--help", "-h", GetoptLong::NO_ARGUMENT ], + [ "--debug", "-d", GetoptLong::NO_ARGUMENT ], + [ "--config", "-c", GetoptLong::REQUIRED_ARGUMENT ] ) result.each { |opt,arg| @@ -32,7 +30,8 @@ result.each { |opt,arg| puts "There is no help yet" exit else - raise "Invalid option '#{opt}'" + $stderr.puts "Invalid option '#{opt}'" + exit(12) end } |