fix(build): fix shell syntax error in smoke_test_imports heredoc
Lint & Test / test (push) Successful in 2m6s

The 'cmd <<EOF || { ... }' pattern confuses bash's parser — the closing
brace of the inline error block collides with the function's closing
brace. Rewrote to capture the python script into a local var via
$(cat <<EOF), then run it with -c and a plain 'if !' guard.
This commit is contained in:
2026-04-07 23:41:42 +03:00
parent 17c5c02993
commit feb91ad281
+8 -4
View File
@@ -217,10 +217,8 @@ smoke_test_imports() {
# installation — Pillow for example is only a Windows dep. But if a
# module's top-level package dir exists in site-packages and we
# can't import it, that's a broken install and we abort.
PYTHONPATH="$pypath" "$py_cmd" - "$sp_dir" <<'PYEOF' || {
echo " ERROR: smoke test failed — site-packages is broken, aborting build"
return 1
}
local smoke_script
smoke_script=$(cat <<'PYEOF'
import importlib
import os
import sys
@@ -266,4 +264,10 @@ if failed:
print(f' Smoke test passed ({tested} imported, {skipped} not installed)')
PYEOF
)
if ! PYTHONPATH="$pypath" "$py_cmd" -c "$smoke_script" "$sp_dir"; then
echo " ERROR: smoke test failed — site-packages is broken, aborting build"
return 1
fi
}