From 0880f1d6f6c92c625be4f5d3d86f80fd3b425b96 Mon Sep 17 00:00:00 2001 From: LukBukkit Date: Sat, 6 Aug 2016 18:06:00 +0200 Subject: Fixed issues relating to the Windows 10 Ubuntu bash --- src/main/java/org/spigotmc/builder/Builder.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/spigotmc/builder/Builder.java b/src/main/java/org/spigotmc/builder/Builder.java index d747693..53b6b00 100644 --- a/src/main/java/org/spigotmc/builder/Builder.java +++ b/src/main/java/org/spigotmc/builder/Builder.java @@ -143,10 +143,8 @@ public class Builder System.err.println( "*** WARNING *** Use java -version to check your version and update as soon as possible." ); } - try - { - runProcess( CWD, "bash", "-c", "exit" ); - } catch ( Exception ex ) + String shell = System.getenv().get( "SHELL" ); + if ( shell == null || shell.trim().isEmpty() ) { System.out.println( "You must run this jar through bash (msysgit)" ); System.exit( 1 ); @@ -426,7 +424,7 @@ public class Builder try { - runProcess( spigot, "bash", "applyPatches.sh" ); + runProcess( spigot, shell, "applyPatches.sh" ); System.out.println( "*** Spigot patches applied!" ); if ( !skipCompile ) -- cgit v1.2.3