mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-27 10:42:35 +03:00
Catch errors when trying to derive CWD in Linux (#1798)
Catch errors when trying to derive CWD in Linux
This commit is contained in:
commit
a241f2b36f
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user