refactor(lib): use ripgrep instead of git grep
#7849
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Although this is a refactor for normal users of Doom, it is a bugfix for one (I assume) unsupported configuration: when Doom is not running from a git checkout. In that case,
doom--help-package-configs
currently returns Git's error messages. This breaksdoom/help-packages
because it expects each returned line to contain at least one:
character, so it errors out withWrong number of arguments: (file line _match &rest), 2
.Using ripgrep here should be equivalent for normal users as long as they have not added untracked files not covered by Doom's .gitignore.
Assuming Doom outside of a git checkout is indeed unsupported, please close this PR if you don't want to spend time on it: when I saw the TODO in that function I figured I'd send this in, but it shouldn't be too hard to work around locally.
(I'm running into this running Doom from the Nix store. So far, this is the only issue I've encountered doing so. I've tested this change with that setup and with a more normal Doom install.)