Skip to content

fix(ssh): honor T3CODE_HOME on the remote host - #1

Merged
PixelHabits merged 1 commit into
devfrom
ssh-honor-t3code-home
Sep 15, 2026
Merged

PixelHabits merged 1 commit into
devfrom
ssh-honor-t3code-home

Conversation

@PixelHabits

Copy link
Copy Markdown
Owner

Problem

The remote launch, pairing, stop and log scripts hardcode $HOME/.t3 for the ssh-launch state directory and start the server with --base-dir "$HOME/.t3". A remote host that sets T3CODE_HOME still gets ~/.t3, because the flag overrides the variable.

Change

All four scripts use ${T3CODE_HOME:-$HOME/.t3}. Hosts without the variable see no change.

Verification

  • vp test run packages/ssh: 48 passed
  • vp lint packages/ssh/src/tunnel.ts: clean

Upstream

Candidate for a PR to pingdotgg/t3code as a bug fix. It does not change the default storage layout, so it is separate from the XDG discussion in pingdotgg#10810.

The remote launch, pairing, stop and log scripts hardcoded $HOME/.t3 for
the ssh-launch state directory and passed --base-dir "$HOME/.t3" to the
server, so a remote host with T3CODE_HOME set still got ~/.t3.

Use ${T3CODE_HOME:-$HOME/.t3} in all four scripts. The default is
unchanged for hosts without the variable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant