SPIGOT-39: Try falling back to bash if no shell set

This commit is contained in:
md_5 2016-10-03 07:29:00 +11:00
parent 27d3fbd1af
commit 4bf25ea519

View file

@ -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