Activate mise shims in the release preflight worker

The exact-SHA preflight streams the worker script over a non-login ssh
shell, so /etc/profile.d/mise.sh is never sourced and a stale system Node
binary on the worker shadows the infra-managed mise toolchain. pulse-dev
carried a manually installed Node 20 symlink in /usr/local/bin, so the
worker failed its Node 24 check while a login shell resolved 24.19.0.
Activate mise shims when mise is installed so the worker uses the same
toolchain the bootstrap provisions, regardless of how it is invoked.
This commit is contained in:
rcourtman
2026-09-01 21:40:05 +01:00
parent 62bfdbca7e
commit 152ef86d33
+7
View File
@@ -39,6 +39,13 @@ GO_TMP_DIR="${RUN_DIR}/go-tmp"
TIMINGS_FILE="${RUN_DIR}/timings.tsv"
TEST_DATA_DIR="${WORKER_ROOT}/test-data/${PROFILE}"
# The worker is invoked over a non-login ssh shell, so /etc/profile.d is not
# sourced and an infra-managed mise toolchain (Node 24, Go) would be shadowed by
# any stale system binary on PATH. Activate mise shims when they are installed.
if [ -x "$HOME/.local/bin/mise" ]; then
eval "$("$HOME/.local/bin/mise" activate bash --shims)"
fi
for command_name in git go node npm docker curl flock timeout python3; do
if ! command -v "$command_name" >/dev/null 2>&1; then
echo "Error: required worker command is missing: ${command_name}" >&2