Args are correctly passed to node runner (#503)

* Arguments are now correctly passed to the noderunner from platform specific scripts.

* Node runner doesn't start CRaSH shell when running in headless mode.
This commit is contained in:
Clinton 2017-04-04 15:56:14 +01:00 committed by GitHub
parent b5c6f6053a
commit 69d6286a5e
3 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ basedir=$( dirname "$0" )
cd "$basedir"
if which osascript >/dev/null; then
/usr/libexec/java_home -v 1.8 --exec java -jar runnodes.jar
/usr/libexec/java_home -v 1.8 --exec java -jar runnodes.jar "$@"
else
java -jar runnodes.jar
java -jar runnodes.jar "$@"
fi

View File

@ -3,6 +3,6 @@
REM Change to the directory of this script (%~dp0)
Pushd %~dp0
java -jar runnodes.jar
java -jar runnodes.jar %*
Popd

View File

@ -80,7 +80,7 @@ private fun execJar(jarName: String, dir: File, args: List<String> = listOf(), d
val nodeName = dir.toPath().fileName
val separator = System.getProperty("file.separator")
val path = System.getProperty("java.home") + separator + "bin" + separator + "java"
val builder = ProcessBuilder(listOf(path, "-Dname=$nodeName") + getDebugPortArg(debugPort) + listOf("-jar", jarName) + args)
val builder = ProcessBuilder(listOf(path, "-Dname=$nodeName") + getDebugPortArg(debugPort) + listOf("-jar", jarName, "--no-local-shell") + args)
builder.redirectError(Paths.get("error.${dir.toPath().fileName}.log").toFile())
builder.inheritIO()
builder.directory(dir)