From eb10fef6d38481044880ef59ee6c7db5d5834efe Mon Sep 17 00:00:00 2001 From: Stephen Zhou Date: Sat, 13 Jul 2024 10:45:39 +0800 Subject: [PATCH] fix: also show terminal after new created --- src/commands/runNpmScriptInTerminal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/runNpmScriptInTerminal.ts b/src/commands/runNpmScriptInTerminal.ts index f68cecf..5da8874 100644 --- a/src/commands/runNpmScriptInTerminal.ts +++ b/src/commands/runNpmScriptInTerminal.ts @@ -20,7 +20,6 @@ export async function runNpmScriptInTerminal(args: Args) { const terminalName = 'Run Script'; let terminal = vscode.window.terminals.find((terminal) => terminal.name === terminalName); if (terminal) { - terminal.show(); terminal.sendText(`cd ${args.cwd}`); } else { terminal = vscode.window.createTerminal({ @@ -29,4 +28,5 @@ export async function runNpmScriptInTerminal(args: Args) { }); } terminal.sendText(`${pm} run ${args.scriptName}`); + terminal.show(); }