diff options
author | md_5 <git@md-5.net> | 2016-10-03 07:29:00 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-10-03 07:29:00 +1100 |
commit | 4bf25ea519ecb912e5320674420f071302d18f05 (patch) | |
tree | 87e862aa6ca72e8ed43f37d033440a61f935f58c /src | |
parent | 27d3fbd1af690bc6a473f8d4b04ffad71a9bb987 (diff) | |
download | buildtools-4bf25ea519ecb912e5320674420f071302d18f05.tar buildtools-4bf25ea519ecb912e5320674420f071302d18f05.tar.gz buildtools-4bf25ea519ecb912e5320674420f071302d18f05.tar.lz buildtools-4bf25ea519ecb912e5320674420f071302d18f05.tar.xz buildtools-4bf25ea519ecb912e5320674420f071302d18f05.zip |
SPIGOT-39: Try falling back to bash if no shell set
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/spigotmc/builder/Builder.java | 11 |
1 files 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 |