asdf icon indicating copy to clipboard operation
asdf copied to clipboard

bug: Updating asdf did not update version number in shim paths

Open AndrewRayCode opened this issue 4 years ago • 10 comments

Describe the Bug

After updating asdf from 0.8.1.1 to 0.9.0, in my ~/.asdf/shims folder, I have lots of shims pointing to the older version:

~/.asdf/shims $ rg 0.8.1

python
6:exec /usr/local/Cellar/asdf/0.8.1_1/libexec/bin/asdf exec "python" "$@"

pip3
6:exec /usr/local/Cellar/asdf/0.8.1_1/libexec/bin/asdf exec "pip3" "$@"

etc

Steps to Reproduce

Install asdf with homebrew

Update asdf with homebrew

Expected Behaviour

Shims to be updated

Actual Behaviour

Shims point to nonexistent older asdf version

Environment

$ asdf info
OS:
Darwin andrew.ray-pro 20.6.0 Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:42 PDT 2021; root:xnu-7195.141.8~1/RELEASE_X86_64 x86_64

SHELL:
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin20)
Copyright (C) 2007 Free Software Foundation, Inc.

ASDF VERSION:
v0.9.0

ASDF ENVIRONMENT VARIABLES:
ASDF_DIR=/usr/local/Cellar/asdf/0.9.0/libexec

ASDF INSTALLED PLUGINS:
python                       [email protected]:danhper/asdf-python.git master 57a4d72
ruby                         [email protected]:asdf-vm/asdf-ruby.git master d0e5a20
terraform                    [email protected]:Banno/asdf-hashicorp.git master 307f78c

asdf plugins affected (if relevant)

No response

AndrewRayCode avatar Jan 03 '22 20:01 AndrewRayCode

I'm having the same issue and asdf reshim doesn't seem to fix the problem

baens avatar Jan 05 '22 03:01 baens

A small workaround is to remove the plugin, then install it again.

baens avatar Jan 05 '22 03:01 baens

Ran into the same issue. My workaround was to rename the ~/.asdf/shims directory and run asdf reshim. That forces asdf to recreate the shims directory and regenerate all of the shims using the updated envvar for ASDF_DIR.

slehman avatar Jan 05 '22 20:01 slehman

Ran into the same issue. My workaround was to rename the ~/.asdf/shims directory and run asdf reshim. That forces asdf to recreate the shims directory and regenerate all of the shims using the updated envvar for ASDF_DIR.

Confirming removing the directory and reshimming worked for me as well.

alecho avatar Jan 07 '22 17:01 alecho

same here

duderman avatar Jan 27 '22 17:01 duderman

Another grateful developer here. Moving the shims dir and asdf reshim worked for me.

jasonwc avatar Jan 28 '22 00:01 jasonwc

^^ thank you @slehman

jnishina avatar Feb 04 '22 16:02 jnishina

+1 Moving the shims dir and asdf reshim worked

Johnsalzarulo avatar Feb 25 '22 14:02 Johnsalzarulo

I think we should close this issue. AFAICT, this is a dupe of https://github.com/asdf-vm/asdf/issues/1103. I tried to write up a very detailed explanation of things over on https://github.com/asdf-vm/asdf/issues/1103#issuecomment-1093094933.

jfly avatar Apr 08 '22 17:04 jfly

I think we should close this issue. AFAICT, this is a dupe of #1103. I tried to write up a very detailed explanation of things over on #1103 (comment).

Taking this advice and closing this in favour of #1103

jthegedus avatar Jun 30 '22 04:06 jthegedus