Skip to content

Commit

Permalink
Avoid Warning: 'ms-enable-electron-run-as-node' is not in the list of…
Browse files Browse the repository at this point in the history
… known options

Signed-off-by: Dominik Jelinek <[email protected]>
  • Loading branch information
djelinek committed Feb 8, 2024
1 parent a65d923 commit 063fcca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/util/codeUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}
Expand All @@ -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);
}

Expand Down Expand Up @@ -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}`;
}
Expand Down Expand Up @@ -343,7 +343,7 @@ export class CodeUtil {
* Check what VS Code version is present in the testing folder
*/
private getExistingCodeVersion(): Promise<string> {
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<string>((resolve, reject) => {
child_process.exec(command, (err, stdout) => {
if (err) return reject(err);
Expand Down

0 comments on commit 063fcca

Please sign in to comment.