Issue #17007 has been updated by Andrew Parker.
This looks to be an unintended consequence of <https://github.com/puppetlabs/puppet/commit/2ea85ef38212ca9ebb79a6e1d57b54a759fbb76e>. Previously the failonfail = true was part of the default hash, but that would be overridden if *any* option is passed (since it would then not be set and would therefore be `nil`). The commit changed it to using a hash merge to preserve defaults when options are specified. ---------------------------------------- Bug #17007: execute method has different semantics in 3.0 https://projects.puppetlabs.com/issues/17007#change-73770 Author: Josh Cooper Status: Accepted Priority: Normal Assignee: Category: Target version: 3.0.x Affected Puppet version: 3.0.0 Keywords: Branch: In 2.7.x, a provider could call the following: <pre> provider.execute('somecommand', {:combine => true}) </pre> which would cause it to not fail on a non-zero exit code. For example, the windows package provider uses this to handle reboot exit codes. In 3.0, the method semantics have changed. `failonfail` is true unless explicitly told otherwise. From what I can tell, this affects the following providers: <pre> lib/puppet/provider/macauthorization/macauthorization.rb:158: output = execute(cmds, :combine => false) lib/puppet/provider/macauthorization/macauthorization.rb:191: cmds, :combine => false, lib/puppet/provider/package/macports.rb:73: result = self.class.parse_installed_query_line(execute([command(:port), "-q", :installed, @resource[:name]], :combine => false)) lib/puppet/provider/package/macports.rb:82: info_line = execute([command(:port), "-q", :info, "--line", "--version", "--revision", @resource[:name]], :combine => false) lib/puppet/provider/package/msi.rb:77: execute(command, :combine => true) lib/puppet/provider/package/msi.rb:86: execute(command, :combine => true) lib/puppet/provider/package/windows.rb:62: execute(command, {:combine => true}) lib/puppet/provider/package/windows.rb:69: execute(command, {:combine => true}) </pre> It's probably best to update the providers to be explicit about the behavior they want, but this could affect custom providers that need to handle non-zero exit codes and don't explicitly specify `:failonfail => false` -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs?hl=en.
