Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

common: Handle empty lib_paths gracefully #286

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

vadorovsky
Copy link
Contributor

env::split_paths() called with an empty string, yields one empty string. This behavior is not really compatible with the forloop it's used in, which in such case is going to produce -L not followed by any path. This causes rustc to fail.

To prevent this issue, enter the loop only when lib_paths is not empty.

That issue was reproducable on MacOS, where lib_paths often ends up being empty.

@vadorovsky
Copy link
Contributor Author

Needs #285 to fix the CI failures.

`env::split_paths()` called with an empty string, yields one empty
string. This behavior is not really compatible with the forloop
it's used in, which in such case is going to produce ` -L ` not
followed by any path. This causes rustc to fail.

To prevent this issue, enter the loop only when `lib_paths` is not
empty.

That issue was reproducable on MacOS, where `lib_paths` often ends
up being empty.
@Manishearth Manishearth merged commit 072c4ce into Manishearth:master Mar 12, 2024
8 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants