Skip to content

fix: fall back when ripgrep refresh fails#1390

Closed
yosofbadr wants to merge 1 commit into
TagStudioDev:mainfrom
yosofbadr:fix/1338-attempting-to-refresh-directory-doesnt-work-after-install-ripgrep
Closed

fix: fall back when ripgrep refresh fails#1390
yosofbadr wants to merge 1 commit into
TagStudioDev:mainfrom
yosofbadr:fix/1338-attempting-to-refresh-directory-doesnt-work-after-install-ripgrep

Conversation

@yosofbadr

@yosofbadr yosofbadr commented Jun 16, 2026

Copy link
Copy Markdown

Summary

Fixes #1338 by making directory refresh call the detected rg executable 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 finally block, and adds regression coverage for the ripgrep-failure fallback path.

Tasks Completed

  • Platforms Tested:
    • Windows x86 - GitHub Actions pytest passed; not manually desktop-tested
    • Windows ARM
    • macOS x86
    • macOS ARM - targeted local test/lint
    • Linux x86 - GitHub Actions pytest passed
    • Linux ARM
  • Tested For:
    • Basic functionality - targeted refresh fallback regression test
    • PyInstaller executable
      • Local: uv run --extra pytest python -m pytest tests/macros/test_refresh_dir.py -q
      • Local: uv run --extra ruff ruff check src/tagstudio/core/library/refresh.py tests/macros/test_refresh_dir.py
      • CI: Ruff, Pyright, REUSE, pytest Linux, pytest Windows, coverage all passed.
      • I did not manually reproduce the original Windows desktop setup with ripgrep installed.

@CyanVoxel CyanVoxel added Status: Review Needed A review of this is needed Type: Fix A fix for a bug, typo, or other issue Type: Installation Installing, building, and/or launching the program TagStudio: Library Relating to the TagStudio library system Priority: High An important issue requiring attention System: Windows For Microsoft Windows labels Jun 16, 2026
@yosofbadr yosofbadr changed the title fix: Attempting to refresh directory doesn't work after install ripgrep fix: fall back when ripgrep refresh fails Jun 16, 2026
@yosofbadr

Copy link
Copy Markdown
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.

@yosofbadr yosofbadr closed this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: High An important issue requiring attention Status: Review Needed A review of this is needed System: Windows For Microsoft Windows TagStudio: Library Relating to the TagStudio library system Type: Fix A fix for a bug, typo, or other issue Type: Installation Installing, building, and/or launching the program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Attempting to refresh directory doesn't work after install ripgrep

2 participants