Skip to content

Use Tramp remote path#101

Draft
jkxyz wants to merge 1 commit intopurcell:masterfrom
jkxyz:tramp-path
Draft

Use Tramp remote path#101
jkxyz wants to merge 1 commit intopurcell:masterfrom
jkxyz:tramp-path

Conversation

@jkxyz
Copy link

@jkxyz jkxyz commented Feb 13, 2025

Hi there

Thank you for the useful package!

I'm not sure how viable this code is in its current state, but I wanted to share a fix I made to get envrc working for my setup.

When enabling envrc-mode in remote buffers, it was overwriting PATH while ignoring the Tramp remote path. This was particularly evident in my setup because I'm using Windows. So opening an eshell at a Linux remote directory and running echo $PATH would print out Windows paths.

To alleviate this, I updated envrc--clear and envrc--apply to get the current PATH by using tramp-get-remote-path when the buffer is remote.

I was also able to workaround this by adding a line like

export PATH="foo:$PATH"

to .envrc, which would also then force it to load the correct variable since direnv observes that it's changed.

I'll be happy to make the necessary changes to get this fix merged!

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