From 6b5bd7055b01dbe4f4ec0e649d8e7a899cad59b7 Mon Sep 17 00:00:00 2001 From: Lemon-miaow Date: Tue, 29 Sep 2026 02:28:50 +0800 Subject: [PATCH] =?UTF-8?q?test(bootstrap):=20=E5=8E=9F=E5=AD=90=E5=86=99?= =?UTF-8?q?=E5=85=A5=E6=AE=8B=E7=95=99=E4=B8=B4=E6=97=B6=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E6=A3=80=E6=9F=A5=E6=94=B9=E7=94=A8=20glob=EF=BC=8Csh?= =?UTF-8?q?ellcheck=20=E4=B8=8D=E5=86=8D=E6=8A=A5=20ls=20|=20grep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/bootstrap_test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy/bootstrap_test.sh b/deploy/bootstrap_test.sh index a50126a..bae45ec 100644 --- a/deploy/bootstrap_test.sh +++ b/deploy/bootstrap_test.sh @@ -1775,7 +1775,10 @@ expect "a write that fails halfway leaves the old file whole" \ out="$(run_atomic "sync() { return 1; }; write_file_atomic '$wadir/old.env' 0600 < '$wadir/in.replace'")" expect "content that did not reach the disk does not replace the old file" "DIE: could not write $wadir/old.env" "$out" expect "the old file survives a failed sync" "DB_PASSWORD=old-and-whole" "$(cat "$wadir/old.env")" -left="$(cd "$wadir" && ls -a | grep '^old\.env\.' || true)" +left="" +for p in "$wadir"/old.env.*; do + if [ -e "$p" ]; then left="$left${left:+ }${p##*/}"; fi +done if [ -z "$left" ]; then echo "PASS a failed write leaves no temp file beside the old one" else