asdf
asdf copied to clipboard
Ensure we are using installation location instead of symlink location
Summary
Change to resolve actual asdf script location before sourcing anything. Ensures that we are not using symlink location as basis for sourcing.
Fixes:
- https://github.com/asdf-vm/asdf/issues/607
I've also created a PR to Homebrew to change the formula, now that symlink resolution works the right way https://github.com/Homebrew/homebrew-core/pull/51200
Nice @deiga, thanks for fixing this. 👍
There's also a resolve_symlink on utils.bash. May we remove it, and replace any resolve_symlink usage for normalized_readlink and see if everything is ok ?
It would be great to have a test for this so we can prevent regressions.
@Stratus3D @vic I actually realized a simpler way to fix this. Any changes to the Homebrew formula are unnecessary now.
It also turned out, that resolve_symlink was not able to actually resolve symlinks properly.
We've still got the problem with readlink in banned commands test though.
@deiga How is the work on this going? Can you rebase to remove the false negative of Appveyor?
@jthegedus I'm waiting on further comments. I rebased in the meantime
@Stratus3D Are you able to review, rebase and potentially merge this? It seems @deiga may have resolved all the requested changes.
@deiga @jthegedus re-reviewing this now.
I'm going to merge https://github.com/asdf-vm/asdf/pull/1539 and then this PR can be rebased and merged.
@deiga can you rebase this PR? I've merged some changes so only readlink -f is banned now. I think we can merge your changes after another rebase.