-
Notifications
You must be signed in to change notification settings - Fork 774
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: run asdf local <name> <version>
in a directory without .tool-versions, see error messages
#1417
Labels
Comments
I thought perhaps this is caused by the following code evaluating asdf/lib/functions/versions.bash Lines 67 to 68 in 60d4494
May I submit a PR to correct this? |
Thanks for the bug report @h3y6e ! And thanks for pinpointing the issue! |
Thank you for your swift response! |
Stratus3D
added a commit
that referenced
this issue
Jan 5, 2023
…ine (#1418) We need to add trailing newlines to .tool-versions file before appending a new version to the file. The order of the checks was wrong here as the first check assumed the file existed, and the second checked if it did. Switching them fixes the issue. This fix was provided by @h3y6e Fixes #1417
This was referenced Jan 5, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the Bug
If
asdf local <name> <version>
is run with no.tool-versions
in the current directory, then the following error message is printed.This is not a fatal bug because a
.tool-versions
file is generated.Steps to Reproduce
.tool-versions
file does not exist.asdf local <name> <version>
.Expected Behaviour
tail: <$PWD>/.tool-versions: No such file or directory
is not displayed and a.tool-versions
file is created.Actual Behaviour
tail: <$PWD>/.tool-versions: No such file or directory
is displayed. (a.tool-versions
file is created.)Environment
OS: Darwin mbp2019 21.6.0 Darwin Kernel Version 21.6.0: Sun Nov 6 23:31:16 PST 2022; root:xnu-8020.240.14~1/RELEASE_X86_64 x86_64 SHELL: zsh 5.8.1 (x86_64-apple-darwin21.0) ASDF VERSION: v0.11.0 ASDF ENVIRONMENT VARIABLES: ASDF_DIR=/usr/local/opt/asdf/libexec ASDF INSTALLED PLUGINS: elixir https://github.com/asdf-vm/asdf-elixir.git master 1693b35 erlang https://github.com/asdf-vm/asdf-erlang.git master 0d402e6 flutter https://github.com/oae/asdf-flutter.git master d108efd julia https://github.com/rkyleg/asdf-julia.git master 1788f0f kubectl https://github.com/asdf-community/asdf-kubectl.git master 3d00592 nodejs https://github.com/asdf-vm/asdf-nodejs.git master c9e5df4 php https://github.com/asdf-community/asdf-php.git master 306793c python https://github.com/danhper/asdf-python.git master 8505457 ruby https://github.com/asdf-vm/asdf-ruby.git master 4eb815c rust https://github.com/code-lever/asdf-rust.git master 0c88f99 terraform https://github.com/asdf-community/asdf-hashicorp.git master 3122c04 zig https://github.com/cheetah/asdf-zig.git master d88f6db
asdf plugins affected (if relevant)
No response
The text was updated successfully, but these errors were encountered: