Skip to content

Fail shell and CLI tests when ripgrep is missing - #7405

Open
686f6c61 wants to merge 1 commit into
basecamp:quattrofrom
686f6c61:test-require-rg
Open

Fail shell and CLI tests when ripgrep is missing#7405
686f6c61 wants to merge 1 commit into
basecamp:quattrofrom
686f6c61:test-require-rg

Conversation

@686f6c61

Copy link
Copy Markdown

Fixes #7122

Several shell tests (and two test/cli guards) use rg in negative form. A missing binary is exit 127, if rg treats that as "no match", and the file prints ok. require_command already exists for jq / python3 / node; nothing asked for rg.

Require it when test/shell.d/base-test.sh is sourced and at the start of test/cli. Ripgrep is in Omarchy's default package set; this only bites a stripped PATH or a broken install.

Verified:

./test/shell.d/require-rg-test.sh
# ok - missing rg fails the suite instead of skipping negative guards

./test/shell.d/panel-command-path-test.sh
./test/shell.d/bin-style-test.sh

Negative rg guards treat a missing binary as no match, so several
files print ok instead of failing. Require rg up front in
test/shell.d/base-test.sh and test/cli.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

ripgrep is an unchecked test dependency, and without it nine guards report ok instead of failing

2 participants