From 0abf7b492a0188fb886c1de012eeddc03a2f87e5 Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Tue, 19 May 2026 23:23:58 -0700 Subject: [PATCH] fix: include linuxbrew node path in MCP runtime fallbacks Fixes #705 GUI launches of the AppImage on Linux do not inherit the shell PATH, so `find_on_path` and `find_in_user_shell` cannot reach Homebrew-on-Linux's Node install. Add the canonical Linuxbrew paths to `fallback_node_paths` and to `node_binary_candidates_for_home`; `.is_file()` filtering keeps machines without Linuxbrew unaffected. --- src-tauri/src/mcp.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src-tauri/src/mcp.rs b/src-tauri/src/mcp.rs index 6898d37b..1cf27986 100644 --- a/src-tauri/src/mcp.rs +++ b/src-tauri/src/mcp.rs @@ -228,6 +228,9 @@ fn fallback_node_paths() -> Vec { PathBuf::from("/usr/local/bin/node"), ]; + #[cfg(not(windows))] + candidates.push(PathBuf::from("/home/linuxbrew/.linuxbrew/bin/node")); + #[cfg(windows)] { if let Some(program_files) = std::env::var_os("ProgramFiles") { @@ -267,6 +270,7 @@ fn node_binary_candidates_for_home(home: &Path) -> Vec { home.join(".mise").join("shims").join(node_binary_name()), home.join(".asdf").join("shims").join(node_binary_name()), home.join(".volta").join("bin").join(node_binary_name()), + home.join(".linuxbrew").join("bin").join(node_binary_name()), ]; let nvm_dir = home.join(".nvm").join("versions").join("node"); @@ -999,6 +1003,7 @@ mod tests { home.join(".local/share/mise/shims/node"), home.join(".asdf/shims/node"), home.join(".volta/bin/node"), + home.join(".linuxbrew/bin/node"), ]; for candidate in expected {