Skip to content

Commit

Permalink
Fix: Do not used closing terminals to spawn bitbake commands
Browse files Browse the repository at this point in the history
If multiple commands where started at the same time, and we closed a
terminal that was still waiting for the bitbake lock, it could have
been reused.
  • Loading branch information
deribaucourt committed Dec 27, 2023
1 parent 7a4f0de commit bda7639
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/ui/BitbakeTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ export class BitbakePseudoTerminal implements vscode.Pseudoterminal {
}

async close (): Promise<void> {
if (!this.isTaskTerminal()) { bitbakeTerminals.splice(bitbakeTerminals.indexOf(this.parentTerminal as BitbakeTerminal), 1) }
if (this.isBusy()) {
// Wait for this process to be the one executed by bitbakeDriver
await this.process
void this.bitbakeDriver.killBitbake()
}
if (!this.isTaskTerminal()) { bitbakeTerminals.splice(bitbakeTerminals.indexOf(this.parentTerminal as BitbakeTerminal), 1) }
}

handleInput (data: string): void {
Expand Down

0 comments on commit bda7639

Please sign in to comment.