Fix: quick install command include space char

This commit is contained in:
unitwk 2023-01-15 14:41:41 +08:00
parent 499a0b9f72
commit d8cb5af7d6

View File

@ -73,14 +73,13 @@ export class QuickInstallTask extends AsyncTask {
if (config.startCommand && config.startCommand.includes("{{java}}")) { if (config.startCommand && config.startCommand.includes("{{java}}")) {
if (this.hasJava17()) { if (this.hasJava17()) {
config.startCommand = config.startCommand.replace("{{java}}", this.JAVA_17_PATH); config.startCommand = config.startCommand.replace("{{java}}", `"${this.JAVA_17_PATH}"`);
} else { } else {
config.startCommand = config.startCommand.replace("{{java}}", "java"); config.startCommand = config.startCommand.replace("{{java}}", "java");
} }
} }
this.instance.parameters(config); this.instance.parameters(config);
this.stop(); this.stop();
} catch (error) { } catch (error) {
this.error(error); this.error(error);