JRE with spaces in the path

This commit is contained in:
BoykoAlex
2022-02-02 11:38:44 -05:00
parent f42fcbeef8
commit 19809197c8
5 changed files with 12 additions and 12 deletions

View File

@@ -182,7 +182,7 @@ class JVMImpl implements JVM {
}
isJdk(): boolean {
const javaExecutable = this.getJavaExecutable();
const str = ChildProcess.execSync(javaExecutable + ' --list-modules', {windowsHide: true, encoding: 'utf8'});
const str = ChildProcess.execSync(`"${javaExecutable}" --list-modules`, {windowsHide: true, encoding: 'utf8'});
return str.search(/^jdk.management@.*$/m) >= 0;
}
jarLaunch(jar: string, vmargs?: [string], execFileOptions?: ChildProcess.ExecFileOptions): ChildProcess.ChildProcess {