fix: fall back when ripgrep refresh fails#1390
Closed
yosofbadr wants to merge 1 commit into
Closed
Conversation
8 tasks
Author
|
Closing this after a stricter look. This issue is specifically about refreshing on Windows with ripgrep installed, and I have not tested that actual Windows setup. The added regression test only covers the fallback path, so I do not want to leave this open as if it were fully validated. Sorry for the noise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #1338 by making directory refresh call the detected
rgexecutable directly and fall back to the internal scanner if ripgrep exits unsuccessfully.The previous shell-string invocation could fail to use the detected ripgrep path correctly. This switches to an argument-list subprocess call, cleans up the generated ignore file in a
finallyblock, and adds regression coverage for the ripgrep-failure fallback path.Tasks Completed
uv run --extra pytest python -m pytest tests/macros/test_refresh_dir.py -quv run --extra ruff ruff check src/tagstudio/core/library/refresh.py tests/macros/test_refresh_dir.py