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: getting "You have configured asdf to preserve downloaded files" when I don't #1711

Open
Mellbourn opened this issue Jan 21, 2024 · 5 comments · May be fixed by #1721
Open

bug: getting "You have configured asdf to preserve downloaded files" when I don't #1711

Mellbourn opened this issue Jan 21, 2024 · 5 comments · May be fixed by #1721
Labels

Comments

@Mellbourn
Copy link

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 setting always_keep_download = no but the warning persists.

Content of my $HOME/.asdfrc file:

legacy_version_file = yes
always_keep_download = no

Steps to Reproduce

  1. install something, e.g.
> asdf install direnv 2.31.0

Expected Behaviour

The following output only:

∗ Downloading and installing direnv...
The installation was successful!

Actual Behaviour

I always get two rows of warnings at the end of any installation:

∗ Downloading and installing direnv...
The installation was successful!
asdf: Warn: You have configured asdf to preserve downloaded files (with always_keep_download=yes or --keep-download). But
asdf: Warn: the current plugin (direnv) does not support that. Downloaded files will not be preserved.

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 git@github.com:jonathanmorley/asdf-bundler.git master a461ac4
direnv git@github.com:asdf-community/asdf-direnv.git master a2219c2
java git@github.com:halcyon/asdf-java.git master fc28b48
lazydocker git@github.com:comdotlinux/asdf-lazydocker.git master abb6f71
nodejs git@github.com:asdf-vm/asdf-nodejs.git master c5b7c40
python git@github.com:danhper/asdf-python.git master 5e277e2
ruby git@github.com:asdf-vm/asdf-ruby.git master 7a22142

@Mellbourn Mellbourn added the bug label Jan 21, 2024
@Birdie0
Copy link

Birdie0 commented Jan 30, 2024

Warning was introduced in this commit but I guess condition is incorrect, it's triggered when both always_keep_download in .asdfrc isn't set to yes and --keep-download isn't provided, together with download directory missing.

@reegnz
Copy link

reegnz commented Feb 1, 2024

I'm also facing this issue.
Interestingly if I set always_keep_download = yes it doesn't complain, so I think the flag check is botched and does the reverse of what it actually should.

@gurrenPizza
Copy link

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:

OS: Pop!_OS 22.04 LTS x86_64 
Shell: zsh 5.8.1
BASH version: 5.1.16(1)-release
asdf version: v0.14.0-ccdd47d

Birdie0 added a commit to Birdie0/asdf that referenced this issue Feb 19, 2024
@Birdie0 Birdie0 linked a pull request Feb 19, 2024 that will close this issue
Birdie0 added a commit to Birdie0/asdf that referenced this issue Feb 19, 2024
Birdie0 added a commit to Birdie0/asdf that referenced this issue Feb 19, 2024
Birdie0 added a commit to Birdie0/asdf that referenced this issue Feb 19, 2024
@klippx
Copy link

klippx commented Apr 19, 2024

@Mellbourn Hello there! 👋

I also have this issue, I am not using a .asdfrc but rather a .tool-versions and I am getting this warning on CI only, from the action asdf-vm/actions/install@v2. I guess it could be related.

Will the PR be merged "soon" ? 😅

@doolio
Copy link

doolio commented Apr 25, 2024

I also experience this behaviour with asdf v0.14.0-ccdd47d.

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

Successfully merging a pull request may close this issue.

6 participants