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 up busybox detection for relative symlinks #4522

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

jonmeow
Copy link
Contributor

@jonmeow jonmeow commented Nov 13, 2024

Handling for relative symlinks is new (comment talks about relative symlinks). Relocated to add tests though, to do extra checking of logic.

@jonmeow jonmeow changed the title Fix up busybox detection Fix up busybox detection for relative symlinks Nov 13, 2024
@josh11b josh11b added this pull request to the merge queue Nov 14, 2024
Merged via the queue into carbon-language:trunk with commit c59faea Nov 14, 2024
8 checks passed
@jonmeow jonmeow deleted the busybox branch November 14, 2024 17:37
Copy link
Contributor

@chandlerc chandlerc left a comment

Choose a reason for hiding this comment

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

Sorry for the late comment, but also not critical...

Comment on lines +40 to +41
// Do a path join, to handle relative symlinks.
info.bin_path = info.bin_path.parent_path() / symlink_target;
Copy link
Contributor

Choose a reason for hiding this comment

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

This only handles relative symlinks. That's certainly what we need at the moment, but do you want to support both? Worth documenting only relative?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean "only"? My understanding is this works for absolute, copying from https://en.cppreference.com/w/cpp/filesystem/path/append:

path("foo") / "/bar"; // the result is "/bar" (replaces)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should have an explicit test though, so sent #4528

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

Successfully merging this pull request may close these issues.

4 participants