From 063fcca8b347bc0f2818ac59db4e88a846877418 Mon Sep 17 00:00:00 2001 From: Dominik Jelinek Date: Thu, 8 Feb 2024 20:36:56 +0100 Subject: [PATCH] Avoid Warning: 'ms-enable-electron-run-as-node' is not in the list of known options Signed-off-by: Dominik Jelinek --- src/util/codeUtil.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/codeUtil.ts b/src/util/codeUtil.ts index 273ddbb82..64f56610c 100644 --- a/src/util/codeUtil.ts +++ b/src/util/codeUtil.ts @@ -160,7 +160,7 @@ export class CodeUtil { } private installExt(pathOrID: string): void { - let command = `${this.cliEnv} "${this.executablePath}" "${this.cliPath}" --ms-enable-electron-run-as-node --force --install-extension "${pathOrID}"`; + let command = `${this.cliEnv} "${this.executablePath}" "${this.cliPath}" --force --install-extension "${pathOrID}"`; if (this.extensionsFolder) { command += ` --extensions-dir=${this.extensionsFolder}`; } @@ -173,7 +173,7 @@ export class CodeUtil { */ open(...paths: string[]): void { const segments = paths.map(f => `"${f}"`).join(' '); - let command = `${this.cliEnv} "${this.executablePath}" "${this.cliPath}" --ms-enable-electron-run-as-node -r ${segments} --user-data-dir="${path.join(this.downloadFolder, 'settings')}"`; + let command = `${this.cliEnv} "${this.executablePath}" "${this.cliPath}" -r ${segments} --user-data-dir="${path.join(this.downloadFolder, 'settings')}"`; child_process.execSync(command); } @@ -215,7 +215,7 @@ export class CodeUtil { const extension = `${pjson.publisher}.${pjson.name}`; if (cleanup) { - let command = `${this.cliEnv} "${this.executablePath}" "${this.cliPath}" --ms-enable-electron-run-as-node --uninstall-extension "${extension}"`; + let command = `${this.cliEnv} "${this.executablePath}" "${this.cliPath}" --uninstall-extension "${extension}"`; if (this.extensionsFolder) { command += ` --extensions-dir=${this.extensionsFolder}`; } @@ -343,7 +343,7 @@ export class CodeUtil { * Check what VS Code version is present in the testing folder */ private getExistingCodeVersion(): Promise { - const command = [this.cliEnv, `"${this.executablePath}"`, `"${this.cliPath}"`, '--ms-enable-electron-run-as-node', '-v'].join(' '); + const command = [this.cliEnv, `"${this.executablePath}"`, `"${this.cliPath}"`, '-v'].join(' '); return new Promise((resolve, reject) => { child_process.exec(command, (err, stdout) => { if (err) return reject(err);