fix(scripts): backup-proffieboard-sdcard.sh tolerates du non-zero exit on macOS#363
Open
kenkoller wants to merge 1 commit into
Open
fix(scripts): backup-proffieboard-sdcard.sh tolerates du non-zero exit on macOS#363kenkoller wants to merge 1 commit into
kenkoller wants to merge 1 commit into
Conversation
…t on macOS The source-summary `du -sh "$SD_MOUNT" | sed ...` pipeline exited non-zero under `set -o pipefail` when `du` hit permission-denied on macOS Spotlight metadata (`.Spotlight-V100/`, `.fseventsd/`), aborting the script silently before rsync ran. Stderr was already redirected to /dev/null, so the only symptom was the script ending right after printing the size summary. Tolerate non-zero exits on the two informational `| sed` pipelines that walk `$SD_MOUNT` (the `du -sh` summary and the `find -maxdepth 1` top-level listing). The rsync, SHA256 manifest, and tree generation downstream are unchanged and continue to enforce errors normally. Observed 2026-05-18 against /Volumes/NO\ NAME on a 2.9 GB 89sabers V3.9-BT SD card. bash -x trace stopped right after the `du | sed` line. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
scripts/hardware-test/backup-proffieboard-sdcard.shaborted silently against macOS-mounted SD cards that contain.Spotlight-V100/(which is most of them). The script printed the source-size header and then ended, never reachingrsync.du -sh "$SD_MOUNT" 2>/dev/null | sed 's/^/ /'— underset -euo pipefail,duexited non-zero from permission-denied on Spotlight metadata; stderr was already silenced, so the pipefail abort was invisible.|| trueto the two informational| sedpipelines that walk$SD_MOUNT(thedu -shsummary on line 40 and thefind -maxdepth 1top-level listing on line 42). Comment in the script explains why. Downstream rsync, SHA256 manifest, and tree generation are unchanged and continue to enforce errors normally.Observed
2026-05-18 against
/Volumes/NO\ NAMEon a 2.9 GB 89sabers V3.9-BT SD card.bash -xtrace stopped right after thedu | sedline.Test plan
bash -n scripts/hardware-test/backup-proffieboard-sdcard.sh— parses cleanpnpm typecheck— 15/15 cachedpnpm test— 15/15 successful (web alone 3802/3802)Notes
docs/research/V39BT_FLASH_NEXT_STEPS.md.[Unreleased].🤖 Generated with Claude Code