Skip to content
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

bug: asdf version 12.x and 13.x clobbers the PATH #1652

Open
botp opened this issue Sep 26, 2023 · 2 comments
Open

bug: asdf version 12.x and 13.x clobbers the PATH #1652

botp opened this issue Sep 26, 2023 · 2 comments
Labels

Comments

@botp
Copy link
Contributor

botp commented Sep 26, 2023

Describe the Bug

i am currently stuck at version 11.1 because versions 12.1 and 13.1 clobbers PATH.

see:

$ ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]

$ which ruby
/home/botp/.asdf/installs/ruby/3.2.2/bin/ruby

... but my .tool-versions tell otherwise

$ cat .tool-versions
ruby 2.7.8
nodejs 19.9.0

... the PATH has changed. "/home/botp/.asdf/installs/ruby/3.2.2/bin" should not have been prepended. note, that if i remove it, tool-versions will work (obviously).

$ echo $PATH
/home/botp/.asdf/installs/ruby/3.2.2/bin:/home/botp/.asdf/shims:/home/botp/.asdf/bin:/home/botp/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Steps to Reproduce

i have multiple versions of ruby.
sh invokes ruby which invokes wmii (a window manager) and creates different windows for different working directory. some of these directories have different versions of ruby but they are controlled (supposedly) by .tool-versions.
when transfering/cd-ing to a directory, the behaviour shows as describe in bug section.

Expected Behaviour

PATH must not be changed.

Actual Behaviour

PATH has changed.

Environment

$ asdf info
OS:
Linux pc-ni-botp 5.4.0-150-generic #167~18.04.1-Ubuntu SMP Wed May 24 00:51:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

SHELL:
GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

BASH VERSION:
4.4.20(1)-release

ASDF VERSION:
v0.13.1-0586b37

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/home/botp/.asdf
ASDF_DIR=/home/botp/.asdf
ASDF_CONFIG_FILE=/home/botp/.asdfrc

ASDF INSTALLED PLUGINS:
elixir                       https://github.com/asdf-vm/asdf-elixir.git master a4c42e1
erlang                       https://github.com/asdf-vm/asdf-erlang.git master 6744df7
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master 9275f49
python                       https://github.com/danhper/asdf-python.git master 5e277e2
ruby                         https://github.com/asdf-vm/asdf-ruby.git master 4e5b177

asdf plugins affected (if relevant)

No response

@botp botp added the bug label Sep 26, 2023
@hyperupcall
Copy link
Contributor

Version v0.12 introduced an environment variable, ASDF_FORCE_PREPEND to control this behavior. It's enabled by default on macOS to work around issues with path_helper.

Does setting it to no resolve this issue?

Related to #1579.

@botp
Copy link
Contributor Author

botp commented Sep 27, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants