summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Fields <travis@puppetlabs.com>2014-10-30 10:23:12 -0700
committerTravis Fields <travis@puppetlabs.com>2014-10-30 10:23:12 -0700
commit35c2dc7ca340c106872459788c167d04140158ca (patch)
treebc426e277a7f8d0c17dde3fee1a4cfd9123be0f4
parent12f734476c3e61f86d22b5fe0a4466edeb937b63 (diff)
parent0db72ea777145cb69ce66dca3ae0ee5746c26934 (diff)
downloadpuppet-stdlib-35c2dc7ca340c106872459788c167d04140158ca.tar.gz
puppet-stdlib-35c2dc7ca340c106872459788c167d04140158ca.tar.bz2
Merge branch '4.3.x'
-rw-r--r--lib/puppet/parser/functions/validate_cmd.rb4
-rwxr-xr-xspec/acceptance/validate_cmd_spec.rb4
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/puppet/parser/functions/validate_cmd.rb b/lib/puppet/parser/functions/validate_cmd.rb
index c855c7e..c6136a5 100644
--- a/lib/puppet/parser/functions/validate_cmd.rb
+++ b/lib/puppet/parser/functions/validate_cmd.rb
@@ -42,8 +42,8 @@ module Puppet::Parser::Functions
rescue Puppet::ExecutionFailure => detail
msg += "\n#{detail}"
raise Puppet::ParseError, msg
- rescue SystemCallError => detail
- msg += "\nWin32::Process::SystemCallError #{detail}"
+ rescue Exception => detail
+ msg += "\n#{detail.class.name} #{detail}"
raise Puppet::ParseError, msg
ensure
tmpfile.unlink
diff --git a/spec/acceptance/validate_cmd_spec.rb b/spec/acceptance/validate_cmd_spec.rb
index a899a1d..5ac66fd 100755
--- a/spec/acceptance/validate_cmd_spec.rb
+++ b/spec/acceptance/validate_cmd_spec.rb
@@ -40,7 +40,9 @@ describe 'validate_cmd function', :unless => UNSUPPORTED_PLATFORMS.include?(fact
validate_cmd($one,$two,"aoeu is dvorak")
EOS
- expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/aoeu is dvorak/)
+ apply_manifest(pp, :expect_failures => true) do |output|
+ expect(output.stderr).to match(/aoeu is dvorak/)
+ end
end
end
describe 'failure' do