Skip to content
This repository was archived by the owner on May 11, 2022. It is now read-only.

Commit 8cc78f5

Browse files
authored
FUSETOOLS2-996 - instead of erroring out, open terminal if it exists (#422)
Signed-off-by: Brian Fitzpatrick <[email protected]>
1 parent ad72a14 commit 8cc78f5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/extensionFunctions.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,10 @@ export async function startTerminal(...rest: any[]): Promise<void>{ //name:strin
155155
}
156156
}
157157
if (name) {
158-
if (findTerminal(name)) {
159-
throw new Error(`Terminal ${name} already exists`);
158+
const oldTerm = findTerminal(name);
159+
if (oldTerm) {
160+
oldTerm.show();
161+
return;
160162
}
161163
}
162164
let terminal : vscode.Terminal | undefined = undefined;

0 commit comments

Comments
 (0)