fix node location on Linux

This commit is contained in:
Volker 2018-08-03 23:23:36 +02:00
parent f755d6fa1b
commit 9bf768c97b

View File

@ -270,7 +270,15 @@ public class WasmRule extends TemporaryFolder {
*/
private ProcessBuilder nodeJsCommand() {
String command = System.getProperty( "node.dir" );
command = command == null ? "node" : command + "/node";
if( command == null ) {
command = "node";
} else {
if( System.getProperty("os.name").toLowerCase().indexOf( "win" ) >= 0 ) {
command += "/node";
} else {
command += "/bin/node";
}
}
return new ProcessBuilder( command, "--experimental-wasm-se", nodeScript.getAbsolutePath() );
}