diff --git a/terminus-terminal/src/services/sessions.service.ts b/terminus-terminal/src/services/sessions.service.ts index 38af203e..33dbcb49 100644 --- a/terminus-terminal/src/services/sessions.service.ts +++ b/terminus-terminal/src/services/sessions.service.ts @@ -291,7 +291,12 @@ export class Session extends BaseSession { return cwd } if (process.platform === 'linux') { - return fs.readlink(`/proc/${this.truePID}/cwd`) + try { + return await fs.readlink(`/proc/${this.truePID}/cwd`) + } catch (exc) { + console.error(exc) + return null + } } if (process.platform === 'win32') { if (!this.guessedCWD) {