Skip to content

Conversation

@cgrindel
Copy link
Contributor

@cgrindel cgrindel commented Aug 1, 2025

The grep command can be influenced by GREP_XXX environment variables. If set, they can affect the behavior/output of the command, causing rlocation to fail.

@cgrindel cgrindel marked this pull request as ready for review August 1, 2025 20:21
function __runfiles_maybe_grep() {
# The GREP_XXX variables influence how grep behaves. Specifically, they can
# affect the output from the grep command.
unset GREP_COLOR
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this local to the function? GREP_COLOR= as a prefix for the actual invocation would be more obviously free of side effects.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@cgrindel cgrindel requested a review from fmeum August 1, 2025 20:51
@fmeum fmeum merged commit 6501f73 into bazelbuild:main Aug 1, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants