diff --git a/core/src/main/java/hudson/Util.java b/core/src/main/java/hudson/Util.java index 064f6504dc6b9ca3e081ffecc5c858020f2a57e5..c4d25503d7efb0acdf16eff133b2bd6f3b1d2c9e 100644 --- a/core/src/main/java/hudson/Util.java +++ b/core/src/main/java/hudson/Util.java @@ -159,7 +159,7 @@ public class Util { return tmp; } - private static final Pattern errorCodeParser = Pattern.compile(".*error=([0-9]+).*"); + private static final Pattern errorCodeParser = Pattern.compile(".*CreateProcess.*error=([0-9]+).*"); /** * On Windows, error messages for IOException aren't very helpful. @@ -178,9 +178,6 @@ public class Util { * null if there seems to be no error code or if the platform is not Win32. */ public static String getWin32ErrorMessage(IOException e) { - if(File.separatorChar!='\\') - return null; // not Windows - Matcher m = errorCodeParser.matcher(e.getMessage()); if(!m.matches()) return null; // failed to parse