Skip to content

Commit 385f009

Browse files
author
Morgan Haskel
committed
Merge pull request #348 from cyberious/4.3.x
Add proper exception catching of Windows errors when CreateProcess does not succeed
2 parents cfc79e9 + 328aae2 commit 385f009

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/puppet/parser/functions/validate_cmd.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ module Puppet::Parser::Functions
4242
rescue Puppet::ExecutionFailure => detail
4343
msg += "\n#{detail}"
4444
raise Puppet::ParseError, msg
45+
rescue SystemCallError => detail
46+
msg += "\nWin32::Process::SystemCallError #{detail}"
47+
raise Puppet::ParseError, msg
4548
ensure
4649
tmpfile.unlink
4750
end

0 commit comments

Comments
 (0)