Skip to content

Commit

Permalink
Fix AEROSPACE_FOCUSED_WORKSPACE env var in exec-on-workspace-change c…
Browse files Browse the repository at this point in the history
…allback

#585

The bug was introduced in 744b825
because of inaccurate find and replace
  • Loading branch information
nikitabobko committed Oct 13, 2024
1 parent 817a34f commit b6cf827
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/AppBundle/focus.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b6cf827

Please sign in to comment.