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

@ -145,10 +145,17 @@ public class Builder
String shell = System.getenv().get( "SHELL" ); String shell = System.getenv().get( "SHELL" );
if ( shell == null || shell.trim().isEmpty() ) if ( shell == null || shell.trim().isEmpty() )
{
shell = "bash";
try
{
runProcess( CWD, shell, "-c", "exit" );
} catch ( Exception ex )
{ {
System.out.println( "You must run this jar through bash (msysgit)" ); System.out.println( "You must run this jar through bash (msysgit)" );
System.exit( 1 ); System.exit( 1 );
} }
}
try try
{ {