From 0f1334c69dadde09f0873b5007ddf929b4bfe22b Mon Sep 17 00:00:00 2001 From: Miyoung Choi Date: Sat, 4 Apr 2026 19:31:55 -0500 Subject: [PATCH] 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 --- scripts/backup-workspace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup-workspace.sh b/scripts/backup-workspace.sh index 2007205d0..dc93f72bd 100755 --- a/scripts/backup-workspace.sh +++ b/scripts/backup-workspace.sh @@ -80,7 +80,7 @@ do_restore() { local ts="${2:-}" if [ -z "$ts" ]; then - ts="$(find "$BACKUP_BASE" -mindepth 1 -maxdepth 1 -type d -printf '%f\n' 2>/dev/null | sort -r | head -n1 || true)" + ts="$(find "$BACKUP_BASE" -mindepth 1 -maxdepth 1 -type d -exec basename {} \; 2>/dev/null | sort -r | head -n1 || true)" [ -n "$ts" ] || fail "No backups found in ${BACKUP_BASE}/" info "Using most recent backup: ${ts}" fi