diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-03 02:49:04 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-03 02:49:04 +0000 |
commit | f797487ee2672c7e91b74c57d839cd52102a16d1 (patch) | |
tree | aa1595a97780f7e6f96cb35ac000f0b313add0e3 /lib | |
parent | ff18e5592467c4b8fe2cedf48cd8f9332e0eff32 (diff) | |
download | puppet-f797487ee2672c7e91b74c57d839cd52102a16d1.tar.gz puppet-f797487ee2672c7e91b74c57d839cd52102a16d1.tar.xz puppet-f797487ee2672c7e91b74c57d839cd52102a16d1.zip |
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
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/puppet/type/exec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |