macos: set the proper env var

This commit is contained in:
Mitchell Hashimoto
2023-09-20 12:43:35 -07:00
parent 718c8d7ac8
commit bd528f5c11
2 changed files with 5 additions and 4 deletions

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSEnvironment</key>
<dict>
<key>GHOSTTY_MAC_APP</key>
<string>1</string>
<key>LSEnvironment</key>
<dict/>
</dict>
</dict>
</plist>

View File

@ -6,7 +6,7 @@ import GhosttyKit
// whether we launch from the app or not. A user can fake this if
// they want but they're doing so at their own detriment...
let process = ProcessInfo.processInfo
if (process.environment["GHOSTTY_MAC_APP"] == "") {
if ((process.environment["GHOSTTY_MAC_APP"] ?? "") == "") {
ghostty_cli_main(UInt(CommandLine.argc), CommandLine.unsafeArgv)
exit(1)
}