install_symlink_p: Fix when dest includes a symlink#5793
Merged
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom Mar 17, 2019
Merged
install_symlink_p: Fix when dest includes a symlink#5793MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
Conversation
dfe3d5a to
39c6ec1
Compare
Contributor
Author
|
I've marked this as |
Member
|
Suggestion: write a test to reproduce the issue you saw. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Contributor
Author
|
I've been using this PR myself for a while, and I'm happy with it. I'll write a test. |
install_symlink_p does not work as intended when dst includes a symlink in its path. relative_path_from requires that both src and dst be real paths without symlinks. From https://ruby-doc.org/stdlib-2.3.7/libdoc/pathname/rdoc/Pathname.html#method-i-relative_path_from This method doesn't access the filesystem. It assumes no symlinks.
39c6ec1 to
5cb458d
Compare
Contributor
Author
|
I've added a test. |
MikeMcQuaid
approved these changes
Mar 17, 2019
Member
|
Thanks again @sjackman! |
Contributor
Author
|
Thanks for merging, Mike! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
install_symlink_p does not work as intended when dst includes a symlink in its path.
relative_path_from requires that both src and dst be real paths without symlinks.
From https://ruby-doc.org/stdlib-2.3.7/libdoc/pathname/rdoc/Pathname.html#method-i-relative_path_from
brew stylewith your changes locally?brew testswith your changes locally?