From 6e1d6f3afe089b2ccfb9264d4719f0f543978479 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 6 Sep 2025 07:09:05 -0700 Subject: [PATCH] config: probable cli should return false on macOS for desktop launch Fixes #8542 The comment explains why this is needed. --- src/config/Config.zig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/config/Config.zig b/src/config/Config.zig index 221a7cf93..3ef39d87c 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -4535,6 +4535,13 @@ fn probableCliEnvironment() bool { // its not a real supported target and GTK via WSL2 assuming // single instance is probably fine. .windows => return false, + + // On macOS, we don't want to detect `open` calls as CLI envs. + // Our desktop detection on macOS is very accurate due to how + // processes are launched on macOS, so if we detect we're launched + // from the app bundle then we're not in a CLI environment. + .macos => if (internal_os.launchedFromDesktop()) return false, + else => {}, }