From 9bf768c97b5723db93192b66a8352fbd01ff5071 Mon Sep 17 00:00:00 2001 From: Volker Date: Fri, 3 Aug 2018 23:23:36 +0200 Subject: [PATCH] fix node location on Linux --- test/de/inetsoftware/jwebassembly/WasmRule.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/de/inetsoftware/jwebassembly/WasmRule.java b/test/de/inetsoftware/jwebassembly/WasmRule.java index 53976ce..d1f4a82 100644 --- a/test/de/inetsoftware/jwebassembly/WasmRule.java +++ b/test/de/inetsoftware/jwebassembly/WasmRule.java @@ -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() ); }