From bd528f5c116596bc2b822f589a1f88277211c518 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 20 Sep 2023 12:43:35 -0700 Subject: [PATCH] macos: set the proper env var --- macos/Ghostty-Info.plist | 7 ++++--- macos/Sources/main.swift | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/macos/Ghostty-Info.plist b/macos/Ghostty-Info.plist index de2c98bf9..eb64fed93 100644 --- a/macos/Ghostty-Info.plist +++ b/macos/Ghostty-Info.plist @@ -2,9 +2,10 @@ - GHOSTTY_MAC_APP - 1 LSEnvironment - + + GHOSTTY_MAC_APP + 1 + diff --git a/macos/Sources/main.swift b/macos/Sources/main.swift index 9a462b440..990ef8ef1 100644 --- a/macos/Sources/main.swift +++ b/macos/Sources/main.swift @@ -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) }