diff --git a/src/effektManager.ts b/src/effektManager.ts index 0dcd48f..812030c 100644 --- a/src/effektManager.ts +++ b/src/effektManager.ts @@ -505,10 +505,10 @@ export class EffektManager { } /** - * Gets the command arguments for starting the Effekt server. + * Gets the command arguments for starting Effekt. * @returns An array of command arguments. */ - public getEffektArgs(server: boolean = true): string[] { + public getEffektArgs(): string[] { const args: string[] = []; const effektBackend = this.config.get("backend"); const effektLib = this.config.get("lib"); @@ -519,9 +519,6 @@ export class EffektManager { const folders = vscode.workspace.workspaceFolders || []; folders.forEach(folder => args.push("--includes", folder.uri.fsPath)); - if (server) { - args.push("--server"); - } return args; } } diff --git a/src/extension.ts b/src/extension.ts index a8eb1cd..c822bc3 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -31,7 +31,7 @@ async function getEffektRepl() { effektRepl = vscode.window.createTerminal({ name: 'Effekt REPL', shellPath: effektExecutable.path, - shellArgs: effektManager.getEffektArgs(/* server = */ false), + shellArgs: effektManager.getEffektArgs(), isTransient: true, // Don't persist across VSCode restarts }); effektRepl.show(); @@ -131,7 +131,7 @@ export async function activate(context: vscode.ExtensionContext) { }; } else { const effektExecutable = await effektManager.locateEffektExecutable(); - const args = effektManager.getEffektArgs(); + const args = ["--server", ...effektManager.getEffektArgs()]; /* > Node.js will now error with EINVAL if a .bat or .cmd file is passed to child_process.spawn and child_process.spawnSync without the shell option set. * > If the input to spawn/spawnSync is sanitized, users can now pass { shell: true } as an option to prevent the occurrence of EINVALs errors.