summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-10-03 07:29:00 +1100
committermd_5 <git@md-5.net>2016-10-03 07:29:00 +1100
commit4bf25ea519ecb912e5320674420f071302d18f05 (patch)
tree87e862aa6ca72e8ed43f37d033440a61f935f58c /src/main/java/org
parent27d3fbd1af690bc6a473f8d4b04ffad71a9bb987 (diff)
downloadbuildtools-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/main/java/org')
-rw-r--r--src/main/java/org/spigotmc/builder/Builder.java11
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