Skip to content

Commit

Permalink
chore/esm - use await-import over require-in-promise (#221247)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken authored Jul 9, 2024
1 parent 7f17108 commit 53df71b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/vs/code/node/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ function shouldSpawnCliProcess(argv: NativeParsedArgs): boolean {
|| !!argv['telemetry'];
}

interface IMainCli {
main: (argv: NativeParsedArgs) => Promise<void>;
}

export async function main(argv: string[]): Promise<any> {
let args: NativeParsedArgs;

Expand Down Expand Up @@ -112,7 +108,8 @@ export async function main(argv: string[]): Promise<any> {

// Extensions Management
else if (shouldSpawnCliProcess(args)) {
const cli = await new Promise<IMainCli>((resolve, reject) => require(['vs/code/node/cliProcessMain'], resolve, reject));

const cli = await import('vs/code/node/cliProcessMain');
await cli.main(args);

return;
Expand Down

0 comments on commit 53df71b

Please sign in to comment.