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

fix(fish)!: don't resolve symlinks for ASDF_DIR #1583

Merged
merged 1 commit into from
Jul 1, 2023
Merged

fix(fish)!: don't resolve symlinks for ASDF_DIR #1583

merged 1 commit into from
Jul 1, 2023

Conversation

MageJohn
Copy link
Contributor

Summary

In the fish entry point, only make the ASDF_DIR path absolute, and don't resolve symlinks.

Other Information

Without this change, a brew upgrade causes all the shims to be broken.

When asdf is installed by homebrew, it is placed in a versioned directory and then symlinked to /usr/local/opt/asdf. If the symlink is resolved, ASDF_DIR contains the versioned directory. This is a problem because shims use the value of ASDF_DIR to get an absolute path to the asdf executable.

Not resolving symlinks is in line with the asdf.sh entry point.

@MageJohn MageJohn requested a review from a team as a code owner June 28, 2023 13:24
Copy link
Member

@danhper danhper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good to me!

@jthegedus jthegedus merged commit d1a563d into asdf-vm:master Jul 1, 2023
7 checks passed
@MageJohn MageJohn deleted the fish-asdfdir-symlinks branch July 1, 2023 20:46
@evanleck
Copy link

I'm not sure if this patch caused it but after upgrading I keep getting this output in my shell (fish):

realpath: illegal option -- -
usage: realpath [-q] [path ...]

@MageJohn
Copy link
Contributor Author

@evanleck I think your right, this probably is the culprit. It looks like, despite there being a fish builtin realpath command that supports the --no-symlinks flag, it first uses the system realpath. If that doesn't support the flag (which is the case on Mac), then there's a problem. I'll open a PR to fix this.

@evanleck
Copy link

@MageJohn thank you 🙏

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

Successfully merging this pull request may close these issues.

4 participants