From 328aae223f28881746f45d76c778ddbfa3adce39 Mon Sep 17 00:00:00 2001 From: Travis Fields Date: Tue, 28 Oct 2014 16:46:16 -0700 Subject: [PATCH] Add proper exception catching of Windows errors when CreateProcess does not succeed --- lib/puppet/parser/functions/validate_cmd.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/puppet/parser/functions/validate_cmd.rb b/lib/puppet/parser/functions/validate_cmd.rb index 652aa5584..c855c7e20 100644 --- a/lib/puppet/parser/functions/validate_cmd.rb +++ b/lib/puppet/parser/functions/validate_cmd.rb @@ -42,6 +42,9 @@ module Puppet::Parser::Functions rescue Puppet::ExecutionFailure => detail msg += "\n#{detail}" raise Puppet::ParseError, msg + rescue SystemCallError => detail + msg += "\nWin32::Process::SystemCallError #{detail}" + raise Puppet::ParseError, msg ensure tmpfile.unlink end