From b8f437a583b195e6303ffa7f4c579397dffc5366 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Sat, 17 Feb 2007 13:36:53 +0000 Subject: [PATCH] modified to check for Win32 error message even for Unix machines, since slaves may be Windows. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2238 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/Util.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/src/main/java/hudson/Util.java b/core/src/main/java/hudson/Util.java index 064f6504dc..c4d25503d7 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