]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Add proper exception catching of Windows errors when CreateProcess does not succeed
authorTravis Fields <travis@puppetlabs.com>
Tue, 28 Oct 2014 23:46:16 +0000 (16:46 -0700)
committerTravis Fields <travis@puppetlabs.com>
Wed, 29 Oct 2014 18:47:57 +0000 (11:47 -0700)
lib/puppet/parser/functions/validate_cmd.rb

index 652aa558445ace1ed895603fbffa3a67905ee864..c855c7e20edecffa1c03e35eda05be9f76ae7641 100644 (file)
@@ -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