Use execFileSync instead of execSync
This commit is contained in:
@@ -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.execFileSync(javaExecutable, ['--list-modules'], {windowsHide: true, encoding: 'utf8'});
|
||||
return str.search(/^jdk.management@.*$/m) >= 0;
|
||||
}
|
||||
jarLaunch(jar: string, vmargs?: [string], execFileOptions?: ChildProcess.ExecFileOptions): ChildProcess.ChildProcess {
|
||||
|
||||
Reference in New Issue
Block a user