Skip to content

Commit 0f1334c

Browse files
miyoungcclaude
andcommitted
fix(scripts): replace GNU find -printf with POSIX basename in backup-workspace.sh
The -printf flag is GNU-specific and silently fails on macOS/BSD. Use -exec basename instead for cross-platform compatibility. Fixes #1431 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c99e3e8 commit 0f1334c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/backup-workspace.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ do_restore() {
8080
local ts="${2:-}"
8181

8282
if [ -z "$ts" ]; then
83-
ts="$(find "$BACKUP_BASE" -mindepth 1 -maxdepth 1 -type d -printf '%f\n' 2>/dev/null | sort -r | head -n1 || true)"
83+
ts="$(find "$BACKUP_BASE" -mindepth 1 -maxdepth 1 -type d -exec basename {} \; 2>/dev/null | sort -r | head -n1 || true)"
8484
[ -n "$ts" ] || fail "No backups found in ${BACKUP_BASE}/"
8585
info "Using most recent backup: ${ts}"
8686
fi

0 commit comments

Comments
 (0)