From 4bf25ea519ecb912e5320674420f071302d18f05 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 3 Oct 2016 07:29:00 +1100 Subject: SPIGOT-39: Try falling back to bash if no shell set --- src/main/java/org/spigotmc/builder/Builder.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/spigotmc/builder/Builder.java b/src/main/java/org/spigotmc/builder/Builder.java index 53b6b00..c7e4c39 100644 --- a/src/main/java/org/spigotmc/builder/Builder.java +++ b/src/main/java/org/spigotmc/builder/Builder.java @@ -146,8 +146,15 @@ public class Builder 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 ); + shell = "bash"; + try + { + runProcess( CWD, shell, "-c", "exit" ); + } catch ( Exception ex ) + { + System.out.println( "You must run this jar through bash (msysgit)" ); + System.exit( 1 ); + } } try -- cgit v1.2.3