summaryrefslogtreecommitdiffstats
path: root/lib/puppet/type/exec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/type/exec.rb')
-rwxr-xr-xlib/puppet/type/exec.rb17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/puppet/type/exec.rb b/lib/puppet/type/exec.rb
index 065f1b65d..cd9c02034 100755
--- a/lib/puppet/type/exec.rb
+++ b/lib/puppet/type/exec.rb
@@ -44,8 +44,7 @@ module Puppet
It is recommended to avoid duplicate names whenever possible.
Note that if an ``exec`` receives an event from another resource,
- it will get executed again (or execute the command specified in
- ``refresh``, if there is one).
+ it will get executed again (or execute the command specified in ``refresh``, if there is one).
There is a strong tendency to use ``exec`` to do whatever work Puppet
can't already do; while this is obviously acceptable (and unavoidable)
@@ -121,8 +120,8 @@ module Puppet
@output, @status = @resource.run(self.resource[:command])
break if self.should.include?(@status.exitstatus.to_s)
if try_sleep > 0 and tries > 1
- debug("Sleeping for #{try_sleep} seconds between tries")
- sleep try_sleep
+ debug("Sleeping for #{try_sleep} seconds between tries")
+ sleep try_sleep
end
end
rescue Timeout::Error
@@ -148,8 +147,7 @@ module Puppet
end
unless self.should.include?(@status.exitstatus.to_s)
- self.fail("%s returned %s instead of one of [%s]" %
- [self.resource[:command], @status.exitstatus, self.should.join(",")])
+ self.fail("%s returned %s instead of one of [%s]" % [self.resource[:command], @status.exitstatus, self.should.join(",")])
end
return event
@@ -584,7 +582,7 @@ module Puppet
end
end
end
-
+
unless FileTest.exists?(exe)
raise ArgumentError, "Could not find executable '%s'" % exe
end
@@ -656,8 +654,7 @@ module Puppet
value = $2
if environment.include? name
warning(
- "Overriding environment setting '%s' with '%s'" %
- [name, value]
+ "Overriding environment setting '%s' with '%s'" % [name, value]
)
end
environment[name] = value
@@ -693,7 +690,7 @@ module Puppet
self.fail "'%s' is both unqualifed and specified no search path" % cmd
end
end
-
+
def extractexe(cmd)
# easy case: command was quoted
if cmd =~ /^"([^"]+)"/