summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rwxr-xr-xlib/puppet/type/exec.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/puppet/type/exec.rb b/lib/puppet/type/exec.rb
index 6c15e1c7f..0378e78ba 100755
--- a/lib/puppet/type/exec.rb
+++ b/lib/puppet/type/exec.rb
@@ -347,7 +347,7 @@ module Puppet
# Return true if the command does not return 0.
def check
- output, status = @parent.run(self.value)
+ output, status = @parent.run(self.value, true)
return status.exitstatus != 0
end
@@ -374,7 +374,7 @@ module Puppet
# Return true if the command returns 0.
def check
- output, status = @parent.run(self.value)
+ output, status = @parent.run(self.value, true)
return status.exitstatus == 0
end
@@ -462,7 +462,11 @@ module Puppet
dir ||= Dir.pwd
- debug "Executing '#{command}'"
+ if check
+ debug "Executing check '#{command}'"
+ else
+ debug "Executing '#{command}'"
+ end
begin
# Do our chdir
Dir.chdir(dir) {