apply.sh: fix the compat preflight heredoc closing its own command substitution
CI / shell (shellcheck + syntax) (push) Successful in 9s
CI / python 3.11 (push) Successful in 14s
CI / python 3.12 (push) Successful in 16s
CI / python 3.13 (push) Successful in 29s

The trailing ) ended $( on the same line, so the Python body parsed as shell and
the real closer was unmatched. Caught by shellcheck in CI (SC1089).
This commit is contained in:
2026-07-13 17:27:41 +00:00
parent 5cbb7def6f
commit 9236aa0034
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -227,7 +227,7 @@ fi
_TC_COMPAT_JSON="$PATCH_DIR/incompatible.json"
rm -f "$_TC_COMPAT_JSON"
_tc_compat=$("$PYTHON" - "$PATCH_DIR" "$_MW_DIR" "$_TC_COMPAT_JSON" <<'PYEOF' 2>/dev/null || printf 'unknown\nunknown\n')
_tc_compat=$("$PYTHON" - "$PATCH_DIR" "$_MW_DIR" "$_TC_COMPAT_JSON" 2>/dev/null <<'PYEOF' || printf 'unknown\nunknown\n'
import json, os, sys
patch_dir, mw_dir, out_path = sys.argv[1], sys.argv[2], sys.argv[3]
+3 -2
View File
@@ -77,9 +77,10 @@ printf '%s' "$target" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' \
[ -d .git ] || die "not a git checkout"
git diff --quiet && git diff --cached --quiet \
|| die "working tree is dirty. Commit or stash first -- a release must be
if ! git diff --quiet || ! git diff --cached --quiet; then
die "working tree is dirty. Commit or stash first -- a release must be
reproducible from a commit, not from whatever happened to be on disk."
fi
branch="$(git rev-parse --abbrev-ref HEAD)"
if [ "$branch" = "HEAD" ]; then