-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Differences in PATH treatment between asdf and rtx using shims mode #1061
Comments
this seems to be an XY problem, what is it you're attempting to do that isn't working? asdf will behave the same it just generates PATH entries when each shim is called but rtx is fast enough and can operate in parallel so it is cheap to simply do that calculation ahead of time regardless if it is needed |
Yes it makes a difference....Because both my terraform and python are operated by asdf/rtx But my python in terraform is one fron .venv normally, but the PATH of the rtx python came first because it is happended at the beginning of PATH even if I call only terraform |
For asdf from within terraform call /home/z01jlenh/.asdf/installs/terraform/1.3.6/bin:/home/z01jlenh/github/cpe-application-provisioning-system/cpe-application-provisioning-system/.venv/bin:/home/z01jlenh/.asdf/shims:/home/z01jlenh/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/windows/system32:/mnt/c/windows:/mnt/c/windows/System32/Wbem:/mnt/c/windows/System32/WindowsPowerShell/v1.0/:/mnt/c/windows/System32/OpenSSH/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/Microsoft VS Code/bin:/mnt/c/Users/Jean-Yves/AppData/Local/Microsoft/WindowsApps |
For rtx from with terraform call /home/z01jlenh/.local/share/rtx/installs/terraform/1.3.6/bin:/home/z01jlenh/.local/share/rtx/installs/terraform-docs/0.16.0/bin:/home/z01jlenh/.local/share/rtx/installs/kubectl/1.22.2/bin:/home/z01jlenh/.local/share/rtx/installs/editorconfig-checker/2.6.0/bin:/home/z01jlenh/.local/share/rtx/installs/shfmt/3.5.1/bin:/home/z01jlenh/.local/share/rtx/installs/shellcheck/0.8.0/bin:/home/z01jlenh/.local/share/rtx/installs/flux2/2.1.1/bin:/home/z01jlenh/.local/share/rtx/installs/kustomize/5.0.3/bin:/home/z01jlenh/.local/share/rtx/installs/stern/1.26.0/bin:/home/z01jlenh/.local/share/rtx/installs/github-cli/2.35.0/bin:/home/z01jlenh/.local/share/rtx/installs/helm/3.12.3/bin:/home/z01jlenh/.local/share/rtx/installs/k9s/0.27.4/bin:/home/z01jlenh/.local/share/rtx/installs/bats/1.6.0/bin:/home/z01jlenh/.local/share/rtx/installs/python/3.10.13/bin:/home/z01jlenh/github/cpe-application-provisioning-system/cpe-application-provisioning-system/.venv/bin:/home/z01jlenh/.local/share/rtx/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/windows/system32:/mnt/c/windows:/mnt/c/windows/System32/Wbem:/mnt/c/windows/System32/WindowsPowerShell/v1.0/:/mnt/c/windows/System32/OpenSSH/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/Microsoft VS Code/bin:/mnt/c/Users/Jean-Yves/AppData/Local/Microsoft/WindowsApps |
Another little thing noticed when founding this : Adding rtx shims to PATH with something like this in .bashrc is not completely proof : Because when you call a shell in a shell you have twice this shims in the PATH asdf has some tricks in the . "$HOME/.asdf/asdf.sh to avoid adding two times the shims |
what you're hitting is a variant of #863 which is that rtx should modify PATH in the place that the shims were inserted, not to the very front |
Before, rtx would put the PATH entries at the front of PATH but that is too aggressive in some scenarios Fixes #1061
* remove deprecated missing_runtime_behavior flag * shims: insert rtx PATH entries just before the shim directory Before, rtx would put the PATH entries at the front of PATH but that is too aggressive in some scenarios Fixes #1061
Describe the bug
Differences in PATH treatment between asdf and rtx using shims mode
To Reproduce
Config files :
With asdf :
With rtx :
Expected behavior
asdf adds only python related paths (two additions) on python commands, rtx adds all tools path (shfmt, shellcheck, python) on python commands.
Is it a feature (should be written in documentation in the asdf section related, and perhaps explain why) or a bug (a correction has to be made) ?
rtx doctor
outputThe text was updated successfully, but these errors were encountered: