The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 25, 03:45 UTC
fix(ssh): fix support for remotes that use fnm (#2641)
Co-authored-by: Cursor <cursoragent@cursor.com>
Soorria Saruva committed
Jun 19, 2026 at 13:45 UTC
804d44cfb153d264e4abc9adb9c958dd6720cfa5
2 files changed
+5
-2
packages/ssh/src/tunnel.test.ts
+3
-1
@@ -105,7 +105,9 @@ describe("ssh tunnel scripts", () => {
105
assert.include(script, 'prepend_path_if_dir "$VOLTA_HOME/bin"');
106
assert.include(script, 'prepend_path_if_dir "$HOME/.asdf/shims"');
107
assert.include(script, 'prepend_path_if_dir "$HOME/.local/share/mise/shims"');
108
- assert.include(script, 'eval "$(fnm env --use-on-cd --shell sh)"');
108
+ assert.include(script, 'eval "$(fnm env --shell bash)"');
109
+ assert.include(script, "fnm use --silent-if-unchanged");
110
+ assert.include(script, "fnm use default");
111
assert.include(script, 'prepend_path_if_dir "$HOME/.nodenv/shims"');
112
assert.include(script, 'NVM_DIR="$HOME/.nvm"');
113
assert.include(script, "nvm use --silent default");
packages/ssh/src/tunnel.ts
+2
-1
@@ -398,7 +398,8 @@ ensure_remote_node_path() {
398
prepend_path_if_dir "$FNM_DIR"
399
prepend_path_if_dir "$HOME/.fnm"
400
if ! command -v node >/dev/null 2>&1 && command -v fnm >/dev/null 2>&1; then
401
- eval "$(fnm env --use-on-cd --shell sh)" >/dev/null 2>&1 || eval "$(fnm env --shell sh)" >/dev/null 2>&1 || true
401
+ eval "$(fnm env --shell bash)" >/dev/null 2>&1 || true
402
+ fnm use --silent-if-unchanged >/dev/null 2>&1 || fnm use default >/dev/null 2>&1 || true
403
fi
404
405
prepend_path_if_dir "$HOME/.nodenv/bin"