Skip to content

fix: say what each backend check found when rg is unavailable - #24

Merged
dhaern merged 2 commits into
mainfrom
fix/resolver-diagnostics
Nov 7, 2026
Merged

dhaern merged 2 commits into
mainfrom
fix/resolver-diagnostics

Conversation

@dhaern

@dhaern dhaern commented Nov 7, 2026

Copy link
Copy Markdown
Owner

When no backend is usable, the error now says what each check found instead of listing the checks. In #21 the old message gave no hint that rg was installed but could not be resolved from the server's PATH.

Before (bettergrep):

Neither ripgrep (rg) nor GNU grep is available. Checked system rg, managed rg, ripgrep auto-install, and system grep. Auto-install error: ...

After:

Neither ripgrep (rg) nor GNU grep is available. Checked: system rg not found on PATH; no valid managed rg; system grep not found on PATH. Auto-install error: ...

A binary that is found but rejected shows up as system rg at <path> failed its --version check. betterglob adds the same Checked: part for system and managed rg. The full PATH is not included.

The lookup is the same which call the resolver already makes, repeated only on this failure path. In betterglob a failed lookup leaves the detail out and the original error is kept.

Version 1.2.4 for the three packages and the root.

Verification

Bun 1.4.4. One new test per package, and both fail on 1.2.3. check, typecheck and build are clean.

  • Windows 11: bettergrep 233 pass, 86 skip; betterglob 143 pass, 56 skip.
  • Linux x64 (WSL, tmpfs), Node 24: bettergrep 317 pass, 2 skip; betterglob 198 pass, 1 skip.

No test fails.

Refs #21

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.

1 participant