1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-28 21:13:18 +03:00

ignore screen shutdown errors

This commit is contained in:
Eugene Pankov 2017-07-05 15:21:01 +02:00
parent 80762e92d6
commit 94217f0b01
2 changed files with 6 additions and 2 deletions

View File

@ -322,7 +322,7 @@ export class TerminalTabComponent extends BaseTabComponent {
async destroy () {
super.destroy()
if (this.session) {
if (this.session && this.session.open) {
await this.session.destroy()
}
}

View File

@ -110,6 +110,10 @@ export class ScreenPersistenceProvider extends SessionPersistenceProvider {
}
async terminateSession (recoveryId: string): Promise<void> {
await exec(`screen -S ${recoveryId} -X quit`)
try {
await exec(`screen -S ${recoveryId} -X quit`)
} catch (_) {
// screen has already quit
}
}
}