From 7e6eefa8839ba56dba6bed24890f22909b779865 Mon Sep 17 00:00:00 2001 From: Emmanuel Venisse Date: Wed, 16 Nov 2005 16:06:12 +0000 Subject: [PATCH] git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@345048 13f79535-47bb-0310-9956-ffa450edef68 --- .../installer/BootstrapInstaller.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/bootstrap/bootstrap-installer/src/main/java/org/apache/maven/bootstrap/installer/BootstrapInstaller.java b/bootstrap/bootstrap-installer/src/main/java/org/apache/maven/bootstrap/installer/BootstrapInstaller.java index 587d29222f..a9c3562bb6 100644 --- a/bootstrap/bootstrap-installer/src/main/java/org/apache/maven/bootstrap/installer/BootstrapInstaller.java +++ b/bootstrap/bootstrap-installer/src/main/java/org/apache/maven/bootstrap/installer/BootstrapInstaller.java @@ -196,17 +196,19 @@ public class BootstrapInstaller Runtime r = Runtime.getRuntime(); - String OS = System.getProperty( "os.name" ).toLowerCase(); + String os = System.getProperty( "os.name" ).toLowerCase(); - if ( OS.indexOf( "windows 9" ) > -1 ) + //If this is windows set the shell to command.com or cmd.exe with correct arguments. + if ( os.indexOf( "Windows" ) != -1 ) { - p = r.exec( "command.com /c set" ); - } - else if ( (OS.indexOf( "nt" ) > -1 ) - || ( OS.indexOf( "windows 20" ) > -1 ) - || ( OS.indexOf( "windows xp" ) > -1) ) - { - p = r.exec( "cmd.exe /c set" ); + if (os.indexOf("95") != -1 || os.indexOf("98") != -1 || os.indexOf("Me") != -1) + { + p = r.exec( "command.com /c set" ); + } + else + { + p = r.exec( "cmd.exe /c set" ); + } } else {