summaryrefslogtreecommitdiffstats
path: root/bin/facter
diff options
context:
space:
mode:
Diffstat (limited to 'bin/facter')
-rwxr-xr-xbin/facter13
1 files changed, 6 insertions, 7 deletions
diff --git a/bin/facter b/bin/facter
index ed37fb5..61db7ea 100755
--- a/bin/facter
+++ b/bin/facter
@@ -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
}