handle cwd detection errors on linux

This commit is contained in:
Eugene Pankov 2020-08-14 12:39:14 +02:00
parent 59ce7eeee6
commit f9b7f97863

View File

@ -281,7 +281,7 @@ export class Session extends BaseSession {
}
if (process.platform === 'linux') {
try {
return fs.readlink(`/proc/${this.truePID}/cwd`)
return await fs.readlink(`/proc/${this.truePID}/cwd`)
} catch (exc) {
console.error(exc)
return null