From 53403b158e4076614dce755cc5258e3f825a4516 Mon Sep 17 00:00:00 2001 From: kaziu687 Date: Mon, 23 Nov 2020 00:42:13 +0100 Subject: [PATCH] Handle whitespace in ForgeWrapper (#55) Fix problem with generating version.json via ForgeWrapper when any path contains whitespace --- components/handler.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/handler.js b/components/handler.js index e8bd279..c5bc44a 100644 --- a/components/handler.js +++ b/components/handler.js @@ -375,9 +375,9 @@ class Handler { getForgedWrapped () { return new Promise(resolve => { const libraryDirectory = path.resolve(this.options.overrides.libraryRoot || path.join(this.options.root, 'libraries')) - const launchArgs = `"${this.options.javaPath ? this.options.javaPath : 'java'}" -jar ${path.resolve(this.options.forgeWrapper.jar)}` + - ` --installer=${this.options.forge} --instance=${this.options.root} ` + - `--saveTo=${path.join(libraryDirectory, 'io', 'github', 'zekerzhayard', 'ForgeWrapper', this.options.forgeWrapper.version)}` + const launchArgs = `"${this.options.javaPath ? this.options.javaPath : 'java'}" -jar "${path.resolve(this.options.forgeWrapper.jar)}"` + + ` --installer="${this.options.forge}" --instance="${this.options.root}" ` + + `--saveTo="${path.join(libraryDirectory, 'io', 'github', 'zekerzhayard', 'ForgeWrapper', this.options.forgeWrapper.version)}"` const fw = child.exec(launchArgs) const forgeJson = path.join(this.options.root, 'forge', this.version.id, 'version.json')