From 2522c416ff36e2fcf9cba8afbdbb5cddddec99b4 Mon Sep 17 00:00:00 2001 From: ethernet Date: Wed, 23 Sep 2026 11:53:29 -0400 Subject: [PATCH] fix(update-test): guard the clone fallback's rm -rf against an empty path --- scripts/update-test/hermes-update-rehearsal.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-test/hermes-update-rehearsal.sh b/scripts/update-test/hermes-update-rehearsal.sh index edd57ef5bc..955e256903 100755 --- a/scripts/update-test/hermes-update-rehearsal.sh +++ b/scripts/update-test/hermes-update-rehearsal.sh @@ -182,7 +182,7 @@ clone_entry() { case "$CLONE_MODE" in clonefile) clonefile_entry "$1" "$2" || { warn "fast clone of $(basename "$1") failed; cloning it file by file" - rm -rf "$2/$(basename "$1")"; cp -cpR "$1" "$2/"; } ;; + rm -rf "${2:?}/$(basename "$1")"; cp -cpR "$1" "$2/"; } ;; reflink|copy-gnu) cp -a --reflink=auto "$1" "$2/" ;; *) cp -pR "$1" "$2/" ;; esac