mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
handle failing dscl
This commit is contained in:
@@ -54,7 +54,11 @@ export class Application {
|
|||||||
})
|
})
|
||||||
|
|
||||||
;(promiseIpc as any).on('get-default-mac-shell', async () => {
|
;(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()
|
const configData = loadConfig()
|
||||||
|
Reference in New Issue
Block a user