mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-27 18:55:58 +03:00
fixed cwd detection on el capitan (fixes #63)
This commit is contained in:
parent
8ee93297be
commit
50968508df
@ -118,7 +118,11 @@ export class Session {
|
||||
async getWorkingDirectory (): Promise<string> {
|
||||
if (process.platform === 'darwin') {
|
||||
let lines = (await exec(`lsof -p ${this.truePID} -Fn`))[0].toString().split('\n')
|
||||
return lines[2].substring(1)
|
||||
if (lines[1] === 'fcwd') {
|
||||
return lines[2].substring(1)
|
||||
} else {
|
||||
return lines[1].substring(1)
|
||||
}
|
||||
}
|
||||
if (process.platform === 'linux') {
|
||||
return await fs.readlink(`/proc/${this.truePID}/cwd`)
|
||||
|
Loading…
Reference in New Issue
Block a user