mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-09 06:20:22 +08:00
handle failing dscl
This commit is contained in:
parent
92f5b5a4ae
commit
a1dbcdbae3
@ -54,7 +54,11 @@ export class Application {
|
||||
})
|
||||
|
||||
;(promiseIpc as any).on('get-default-mac-shell', async () => {
|
||||
return (await exec(`/usr/bin/dscl . -read /Users/${process.env.LOGNAME} UserShell`))[0].toString().split(' ')[1].trim()
|
||||
try {
|
||||
return (await exec(`/usr/bin/dscl . -read /Users/${process.env.LOGNAME} UserShell`))[0].toString().split(' ')[1].trim()
|
||||
} catch {
|
||||
return '/bin/bash'
|
||||
}
|
||||
})
|
||||
|
||||
const configData = loadConfig()
|
||||
|
Loading…
Reference in New Issue
Block a user