1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-08 01:34:21 +00:00

fix: implement MO_USE_FIND and improve fd fallback logic

Fixes the issue reported in PR #410 where mo purge fails to find
artifacts when fd returns empty results.

Changes:
- Implement MO_USE_FIND environment variable to force using find
- Improve fd fallback: check if fd output is empty (-s test)
- Add debug logging to show which tool is being used
- If fd returns no results, fallback to find automatically

This fixes the root cause where fd successfully runs (exit 0) but
finds nothing, preventing the find fallback from being triggered.
This commit is contained in:
tw93
2026-02-04 20:05:09 +08:00
parent d8b396533d
commit 7f787b5c04
2 changed files with 6 additions and 6 deletions

View File

@@ -69,7 +69,7 @@ echo "🐹 Running ${title}..."
echo ""
# Command to execute
_MO_RAW_CMD="${raw_cmd}"
_MO_RAW_CMD='${raw_cmd}'
_MO_CMD_ESCAPED="${cmd_escaped}"
has_app() {