Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Fix the terminfo detection to work without a CC env variable. #37

Merged
merged 1 commit into from
Oct 3, 2020

Conversation

chandlerc
Copy link
Contributor

I thought the which API would be well behaved here, but it produces
a hard error on a None argument. Using a default of "" doesn't work
either because of bazelbuild/bazel#12216

I thought the `which` API would be well behaved here, but it produces
a hard error on a `None` argument. Using a default of `""` doesn't work
either because of bazelbuild/bazel#12216
@chandlerc chandlerc requested a review from GMNGeoffrey October 3, 2020 09:24
Comment on lines +50 to +51
if cc_env:
cc = repository_ctx.which(cc_env)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a note that this will also skip if CC="". I think that's what we want, but something to bear in mind. The python style guide says to always make None comparisons explicit for that reason https://google.github.io/styleguide/pyguide.html#2144-decision

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, we actually want that for now due to the Bazel bug. And even when fixed, there is no point, do this still seems good to avoid a pointless call to which.

@chandlerc chandlerc merged commit 8788a30 into google:main Oct 3, 2020
@chandlerc chandlerc deleted the fix-env-which branch October 3, 2020 22:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants