From b6cf82771f245ab7349a93baf8709e171537ff58 Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Sun, 13 Oct 2024 20:21:56 +0200 Subject: [PATCH] Fix AEROSPACE_FOCUSED_WORKSPACE env var in exec-on-workspace-change callback https://github.com/nikitabobko/AeroSpace/issues/585 The bug was introduced in 744b8253b821f34c975bd2e06d82bb3521dbb20f because of inaccurate find and replace --- Sources/AppBundle/focus.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/AppBundle/focus.swift b/Sources/AppBundle/focus.swift index c5462d68..5f42d8a8 100644 --- a/Sources/AppBundle/focus.swift +++ b/Sources/AppBundle/focus.swift @@ -162,7 +162,7 @@ private func onWorkspaceChanged(_ oldWorkspace: String, _ newWorkspace: String) process.executableURL = URL(filePath: exec) process.arguments = Array(config.execOnWorkspaceChange.dropFirst()) var environment = config.execConfig.envVariables - environment["AEROSPACE_WORKSPACE"] = newWorkspace + environment["AEROSPACE_FOCUSED_WORKSPACE"] = newWorkspace environment["AEROSPACE_PREV_WORKSPACE"] = oldWorkspace process.environment = environment Result { try process.run() }.getOrThrow() // todo It's not perfect to fail here