Skip to content

Commit

Permalink
Fix import of server-main.js from main
Browse files Browse the repository at this point in the history
Neglected to update this import when fixing the other.
  • Loading branch information
code-asher committed Oct 18, 2024
1 parent fc6064d commit 7c29865
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/node/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export interface OpenCommandPipeArgs {
export const runCodeCli = async (args: DefaultedArgs): Promise<void> => {
logger.debug("Running Code CLI")
try {
const mod = require(path.join(vsRootPath, "out/server-main")) as VSCodeModule
// See vscode.loadVSCode for more on this jank.
const modPath = path.join(vsRootPath, "out/server-main.js")
const mod = (await eval(`import("${modPath}")`)) as VSCodeModule
const serverModule = await mod.loadCodeWithNls()
await serverModule.spawnCli(await toCodeArgs(args))
// Rather than have the caller handle errors and exit, spawnCli will exit
Expand Down

0 comments on commit 7c29865

Please sign in to comment.