Skip to content

Commit f2e1138

Browse files
committed
bob catches terminals become stale. must be async
1 parent 723b080 commit f2e1138

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/liberty/devCommands.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,9 +617,10 @@ export async function openReport(reportType: string, libProject?: LibertyProject
617617
}
618618

619619
// retrieve LibertyProject corresponding to closed terminal and delete terminal
620-
export function deleteTerminal(terminal: vscode.Terminal): void {
620+
export async function deleteTerminal(terminal: vscode.Terminal): Promise<void> {
621621
try {
622-
const libProject = terminals[Number(terminal.processId)];
622+
const pid = await terminal.processId;
623+
const libProject = terminals[Number(pid)];
623624
libProject.deleteTerminal();
624625
} catch {
625626
console.error(localize("unable.to.delete.terminal", terminal.name));

0 commit comments

Comments
 (0)