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

refactor: Prefer grep's --quiet over standard output redirection #1655

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

hyperupcall
Copy link
Contributor

@hyperupcall hyperupcall commented Sep 27, 2023

Summary

--quiet is an improvement over >/dev/null when checking the exit code to check for a string's existence. Using the former better ensures grep does not return an exit code that is unrelated to condition that a substring or regex is contained within a target string (which is the actual semantics of these particular command executions).

Other

@hyperupcall hyperupcall requested a review from a team as a code owner September 27, 2023 22:06
@hyperupcall hyperupcall changed the title fix: Prefer grep's --quiet over standard output redirection refactor: Prefer grep's --quiet over standard output redirection Oct 6, 2023
@hyperupcall
Copy link
Contributor Author

@danhper Hey are you able to merge this?

Copy link
Contributor

@jthegedus jthegedus left a comment

Choose a reason for hiding this comment

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

Looks good to me, cheers!

@jthegedus jthegedus merged commit d7e0740 into asdf-vm:master Jan 9, 2024
16 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
2 participants