Please review pull request #174: Remove unused silent switch opened by (pcarlisle)

Description:

Command#exec was not checking exit codes if the silent option was turned on.
It turned out that this option isn't recognized anyway, so I'm removing the
code.

  • Opened: Wed Mar 21 17:53:23 UTC 2012
  • Based on: puppetlabs:master (5e0b398dd6fd3d39cc5e87b2352f2039adad40f5)
  • Requested merge: pcarlisle:remove_silent (4f8199ed2c0c406d164c0797fe60e7c52444a743)

Diff follows:

diff --git a/lib/command.rb b/lib/command.rb
index 669620e..26b3302 100644
--- a/lib/command.rb
+++ b/lib/command.rb
@@ -20,15 +20,13 @@ def exec(host, options={})
     cmdline = cmd_line(host)
     result = host.exec(cmdline, options)
 
-    unless options[:silent] then
-      result.log
-      if options[:acceptable_exit_codes].include?(result.exit_code)
-        # cool.
-      elsif options[:failing_exit_codes].include?(result.exit_code)
-        assert( false, "Host '#{host} exited with #{result.exit_code} running: #{cmdline}" )
-      else
-        raise "Host '#{host}' exited with #{result.exit_code} running: #{cmdline}"
-      end
+    result.log
+    if options[:acceptable_exit_codes].include?(result.exit_code)
+      # cool.
+    elsif options[:failing_exit_codes].include?(result.exit_code)
+      assert( false, "Host '#{host} exited with #{result.exit_code} running: #{cmdline}" )
+    else
+      raise "Host '#{host}' exited with #{result.exit_code} running: #{cmdline}"
     end
 
     result

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to