Skip to content

build: Specify full path to the grep utility in rvcmd.sh#1093

Open
mcoliver wants to merge 3 commits intoAcademySoftwareFoundation:mainfrom
mcoliver:fix-grep-path
Open

build: Specify full path to the grep utility in rvcmd.sh#1093
mcoliver wants to merge 3 commits intoAcademySoftwareFoundation:mainfrom
mcoliver:fix-grep-path

Conversation

@mcoliver
Copy link
Copy Markdown
Contributor

some people have grep aliased to something else like rg which uses -E differently. Specifying the full path to the grep bin ensures we are using the right utility.

Linked issues

Fixes #1092

Summarize your change.

Full pathname to grep utility

Describe the reason for the change.

It's great that if the build fails it attempts to grep for things like errors. The issue is that sometime people (like me) have grep aliased to something like ripgrep or silver searcher (ag) which sometimes use flags differently. For example -E is different in gnu grep and ripgrep. Referencing the tool with the full pathname to ensure we are using /usr/bin/grep would be more deterministic.

Describe what you have tested and on which operating system.

macos

Add a list of changes, and note any that might need special attention during the review.

If possible, provide screenshots.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates all grep invocations in rvcmds.sh to use the full path /usr/bin/grep instead of relying on the shell's PATH resolution. This prevents issues when users have grep aliased to alternative tools like ripgrep or ag, which may interpret flags differently (e.g., the -E flag).

Changes:

  • Updated all grep commands to use absolute path /usr/bin/grep
  • Changes span shell detection, hook installation, build error filtering, and user-facing help messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rvcmds.sh Outdated
Comment thread rvcmds.sh Outdated
Comment thread rvcmds.sh Outdated
Comment thread rvcmds.sh Outdated
@cedrik-fuoco-adsk cedrik-fuoco-adsk added the community Contribution from the Open RV Community label Feb 17, 2026
@cedrik-fuoco-adsk cedrik-fuoco-adsk changed the title specify full path to the grep utility build: Specify full path to the grep utility Feb 19, 2026
@cedrik-fuoco-adsk cedrik-fuoco-adsk changed the title build: Specify full path to the grep utility build: Specify full path to the grep utility in rvcmd.sh Feb 19, 2026
mcoliver added 2 commits March 2, 2026 14:58
some people have grep aliased to something else like rg which uses -E differently.  Specifying the full path to the grep bin ensures we are using the right utility.

Signed-off-by: Michael Oliver <mcoliver@gmail.com>
Signed-off-by: Michael Oliver <mcoliver@gmail.com>
Copy link
Copy Markdown
Contributor Author

@mcoliver mcoliver left a comment

Choose a reason for hiding this comment

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

Updated to use command as per co-pilot

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

Labels

community Contribution from the Open RV Community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: build errors grep not working when grep is aliased

3 participants