-
Notifications
You must be signed in to change notification settings - Fork 785
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: getting "You have configured asdf to preserve downloaded files" when I don't #1711
Comments
Warning was introduced in this commit but I guess condition is incorrect, it's triggered when both |
I'm also facing this issue. |
I've also faced this issue after adding the zsh-adf-direnv plugin for zsh. It is the same message and it showed up the first time I ran terminal after installing it, but I've managed to install sqlite (which is what I wanted to install with asdf) through asdf without the message and it didn't show up the next times I opened terminal. Environment:
|
@Mellbourn Hello there! 👋 I also have this issue, I am not using a Will the PR be merged "soon" ? 😅 |
I also experience this behaviour with asdf v0.14.0-ccdd47d. |
Currently, the warning which is intended to alert users that the download directory can't be kept only appears if they haven't asked for it to be. This change just rearranges the logic a bit so that the warning instead only appears if the download directory *should* be kept, but *can't* be kept (because it doesn't exist). fixes asdf-vm#1711
Looking at the current code, it does indeed look like the test is "reversed", but in the sense that the existing test needed to be inverted (and the clauses rearranged) in 19515ed, but wasn't. Probably just a simple brain fart. 🙂 asdf/lib/functions/installs.bash Lines 237 to 246 in ccdd47d
Basically, the current logic is "if not should-keep, (if exists, delete, else, warn)" but needs to be "if should-keep, (if not exists, warn), else (if exists, delete)". I just put together PR #1756, which should hopefully fix things. |
Describe the Bug
Every time I install a new version using asdf, I always get the warning "You have configured asdf to preserve downloaded files"
To start with I had no
.asdfrc
file, so that was strange.Then I even created a
.asdfrc
file with an explicit settingalways_keep_download = no
but the warning persists.Content of my
$HOME/.asdfrc
file:Steps to Reproduce
Expected Behaviour
The following output only:
Actual Behaviour
I always get two rows of warnings at the end of any installation:
Environment
OS: Darwin Klass-MacBook-Pro-16-2023.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:55:06 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6020 arm64 SHELL: zsh 5.9 (x86_64-apple-darwin23.0) BASH VERSION: 5.2.26(1)-release ASDF VERSION: v0.14.0-ccdd47d ASDF INTERNAL VARIABLES: ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions ASDF_DATA_DIR=/Users/klas.mellbourn/.asdf ASDF_DIR=/Users/klas.mellbourn/.asdf ASDF_CONFIG_FILE=/Users/klas.mellbourn/.asdfrc
asdf plugins affected (if relevant)
ASDF INSTALLED PLUGINS:
bundler [email protected]:jonathanmorley/asdf-bundler.git master a461ac4
direnv [email protected]:asdf-community/asdf-direnv.git master a2219c2
java [email protected]:halcyon/asdf-java.git master fc28b48
lazydocker [email protected]:comdotlinux/asdf-lazydocker.git master abb6f71
nodejs [email protected]:asdf-vm/asdf-nodejs.git master c5b7c40
python [email protected]:danhper/asdf-python.git master 5e277e2
ruby [email protected]:asdf-vm/asdf-ruby.git master 7a22142
The text was updated successfully, but these errors were encountered: