Fix deploy precheck pattern handling

This commit is contained in:
dirtydishes 2026-05-08 07:12:05 -04:00
parent 21ec3eb57e
commit 2865d5653d
2 changed files with 6 additions and 3 deletions

View file

@ -178,6 +178,10 @@ function publishCurrentBranch(branch: string): void {
}
function remotePrecheck(): void {
const allowedRemoteUntrackedPattern = Array.from(ALLOWED_REMOTE_UNTRACKED)
.map((path) => shellPattern(path))
.join("|");
runRemoteScript(
"Remote Precheck",
`#!/usr/bin/env bash
@ -196,9 +200,7 @@ while IFS= read -r line; do
'?? '*)
path="\${line#?? }"
case "$path" in
${Array.from(ALLOWED_REMOTE_UNTRACKED)
.map((path) => ` ${shellPattern(path)})`)
.join("\n")}
${allowedRemoteUntrackedPattern})
;;
*)
echo "Refusing rollout: unexpected untracked path on server: $path" >&2