Skip to content

Commit 9c5f2bd

Browse files
committed
fix(acp): Enrich PATH at startup for macOS GUI launches
GUI apps on macOS inherit a minimal PATH that doesn't include Homebrew, nvm, or fnm paths. This caused `node` not to be found when spawning copilot/claude binaries (exit code 127). Add `fix-path-env` crate from tauri-apps which sources the user's login shell PATH at startup, fixing all 7 spawn points at once.
1 parent 8d81e99 commit 9c5f2bd

3 files changed

Lines changed: 41 additions & 0 deletions

File tree

apps/tauri/src-tauri/Cargo.lock

Lines changed: 38 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/tauri/src-tauri/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ rusqlite = { version = "0.31", features = ["bundled"] }
3535
uuid = { version = "1", features = ["v4"] }
3636
chrono = "0.4"
3737
indexmap = "2"
38+
fix-path-env = { git = "https://github.com/tauri-apps/fix-path-env-rs" }

apps/tauri/src-tauri/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,8 @@ fn setup_macos_menu(app: &tauri::App) -> Result<(), Box<dyn std::error::Error>>
873873

874874
#[cfg_attr(mobile, tauri::mobile_entry_point)]
875875
pub fn run() {
876+
let _ = fix_path_env::fix();
877+
876878
let builder = tauri::Builder::default()
877879
.plugin(tauri_plugin_cli::init())
878880
.plugin(tauri_plugin_dialog::init())

0 commit comments

Comments
 (0)