lib/hss/helpers/command.rb in hss-1.0.1 vs lib/hss/helpers/command.rb in hss-1.1.0

- old
+ new

@@ -6,10 +6,10 @@ class Parser private def command(input) result = IO.popen(input) { |cmd| cmd.read.chomp } - fail "Command failed: #{input}" unless $CHILD_STATUS == 0 + raise("Command failed: #{input}") unless $CHILD_STATUS.exitstatus.zero? result rescue Errno::ENOENT raise "Command not found: #{input}" end end