From f797487ee2672c7e91b74c57d839cd52102a16d1 Mon Sep 17 00:00:00 2001 From: luke Date: Sun, 3 Sep 2006 02:49:04 +0000 Subject: Fixing #239 -- missing checks now throw an ArgumentError. This will break if any command purposefully returns 127, but that would be a bug anyway, I suppose. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1540 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/type/exec.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/puppet/type/exec.rb b/lib/puppet/type/exec.rb index ffb4415a1..0dc3ec02a 100755 --- a/lib/puppet/type/exec.rb +++ b/lib/puppet/type/exec.rb @@ -515,6 +515,11 @@ module Puppet end } status = $?.dup + + # The shell returns 127 if the command is missing. + if $?.exitstatus == 127 + raise ArgumentError, output + end } rescue Errno::ENOENT => detail self.fail detail.to_s -- cgit