The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
A locale the machine lacks no longer reads as a checksum mismatch
reinSPQRa1f88c7e076d
diff --git a/store/agents/ableton-ai/toolchain/runtimes.sh b/store/agents/ableton-ai/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/ableton-ai/toolchain/runtimes.sh+++ b/store/agents/ableton-ai/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/autonomous-circuit/toolchain/runtimes.sh b/store/agents/autonomous-circuit/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/autonomous-circuit/toolchain/runtimes.sh+++ b/store/agents/autonomous-circuit/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/autonomous-grid/toolchain/runtimes.sh b/store/agents/autonomous-grid/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/autonomous-grid/toolchain/runtimes.sh+++ b/store/agents/autonomous-grid/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/autonomous-workshop/toolchain/runtimes.sh b/store/agents/autonomous-workshop/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/autonomous-workshop/toolchain/runtimes.sh+++ b/store/agents/autonomous-workshop/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/autoresearch-mlx/toolchain/runtimes.sh b/store/agents/autoresearch-mlx/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/autoresearch-mlx/toolchain/runtimes.sh+++ b/store/agents/autoresearch-mlx/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/blender/toolchain/runtimes.sh b/store/agents/blender/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/blender/toolchain/runtimes.sh+++ b/store/agents/blender/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/bonsai-mcp/toolchain/runtimes.sh b/store/agents/bonsai-mcp/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/bonsai-mcp/toolchain/runtimes.sh+++ b/store/agents/bonsai-mcp/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/circuitjs/toolchain/runtimes.sh b/store/agents/circuitjs/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/circuitjs/toolchain/runtimes.sh+++ b/store/agents/circuitjs/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/comfy-mcp/toolchain/runtimes.sh b/store/agents/comfy-mcp/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/comfy-mcp/toolchain/runtimes.sh+++ b/store/agents/comfy-mcp/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/data-studio/toolchain/runtimes.sh b/store/agents/data-studio/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/data-studio/toolchain/runtimes.sh+++ b/store/agents/data-studio/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/dimos/toolchain/runtimes.sh b/store/agents/dimos/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/dimos/toolchain/runtimes.sh+++ b/store/agents/dimos/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/drone-pilot/toolchain/runtimes.sh b/store/agents/drone-pilot/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100755--- a/store/agents/drone-pilot/toolchain/runtimes.sh+++ b/store/agents/drone-pilot/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/excalidraw/toolchain/runtimes.sh b/store/agents/excalidraw/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/excalidraw/toolchain/runtimes.sh+++ b/store/agents/excalidraw/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/firmware-studio/toolchain/runtimes.sh b/store/agents/firmware-studio/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/firmware-studio/toolchain/runtimes.sh+++ b/store/agents/firmware-studio/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/foam-agent/toolchain/runtimes.sh b/store/agents/foam-agent/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/foam-agent/toolchain/runtimes.sh+++ b/store/agents/foam-agent/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/freecad/toolchain/runtimes.sh b/store/agents/freecad/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/freecad/toolchain/runtimes.sh+++ b/store/agents/freecad/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/game-master/toolchain/runtimes.sh b/store/agents/game-master/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100755--- a/store/agents/game-master/toolchain/runtimes.sh+++ b/store/agents/game-master/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/godogen/toolchain/runtimes.sh b/store/agents/godogen/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/godogen/toolchain/runtimes.sh+++ b/store/agents/godogen/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/godot-studio/toolchain/runtimes.sh b/store/agents/godot-studio/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/godot-studio/toolchain/runtimes.sh+++ b/store/agents/godot-studio/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/harness-monitor/toolchain/runtimes.sh b/store/agents/harness-monitor/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100755--- a/store/agents/harness-monitor/toolchain/runtimes.sh+++ b/store/agents/harness-monitor/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/home-assistant/toolchain/runtimes.sh b/store/agents/home-assistant/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/home-assistant/toolchain/runtimes.sh+++ b/store/agents/home-assistant/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/juce-agent-toolkit/toolchain/runtimes.sh b/store/agents/juce-agent-toolkit/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/juce-agent-toolkit/toolchain/runtimes.sh+++ b/store/agents/juce-agent-toolkit/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/kicad/toolchain/runtimes.sh b/store/agents/kicad/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/kicad/toolchain/runtimes.sh+++ b/store/agents/kicad/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/lab-bench/toolchain/runtimes.sh b/store/agents/lab-bench/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100755--- a/store/agents/lab-bench/toolchain/runtimes.sh+++ b/store/agents/lab-bench/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/machine-monitor/toolchain/runtimes.sh b/store/agents/machine-monitor/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/machine-monitor/toolchain/runtimes.sh+++ b/store/agents/machine-monitor/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/manim/toolchain/runtimes.sh b/store/agents/manim/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/manim/toolchain/runtimes.sh+++ b/store/agents/manim/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/marimo/toolchain/runtimes.sh b/store/agents/marimo/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/marimo/toolchain/runtimes.sh+++ b/store/agents/marimo/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/marp/toolchain/runtimes.sh b/store/agents/marp/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/marp/toolchain/runtimes.sh+++ b/store/agents/marp/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/memories/toolchain/runtimes.sh b/store/agents/memories/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/memories/toolchain/runtimes.sh+++ b/store/agents/memories/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/mujoco/toolchain/runtimes.sh b/store/agents/mujoco/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/mujoco/toolchain/runtimes.sh+++ b/store/agents/mujoco/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/openmontage/toolchain/runtimes.sh b/store/agents/openmontage/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/openmontage/toolchain/runtimes.sh+++ b/store/agents/openmontage/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/openscad/toolchain/runtimes.sh b/store/agents/openscad/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/openscad/toolchain/runtimes.sh+++ b/store/agents/openscad/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/orca-slicer/toolchain/runtimes.sh b/store/agents/orca-slicer/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/orca-slicer/toolchain/runtimes.sh+++ b/store/agents/orca-slicer/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/phaser/toolchain/runtimes.sh b/store/agents/phaser/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/phaser/toolchain/runtimes.sh+++ b/store/agents/phaser/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/rdkit/toolchain/runtimes.sh b/store/agents/rdkit/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/rdkit/toolchain/runtimes.sh+++ b/store/agents/rdkit/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/remotion/toolchain/runtimes.sh b/store/agents/remotion/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/remotion/toolchain/runtimes.sh+++ b/store/agents/remotion/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/roundtable/toolchain/runtimes.sh b/store/agents/roundtable/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/roundtable/toolchain/runtimes.sh+++ b/store/agents/roundtable/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/score/toolchain/runtimes.sh b/store/agents/score/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/score/toolchain/runtimes.sh+++ b/store/agents/score/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/sheet-docs/toolchain/runtimes.sh b/store/agents/sheet-docs/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/sheet-docs/toolchain/runtimes.sh+++ b/store/agents/sheet-docs/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/simskill/toolchain/runtimes.sh b/store/agents/simskill/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/simskill/toolchain/runtimes.sh+++ b/store/agents/simskill/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/strudel/toolchain/runtimes.sh b/store/agents/strudel/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/strudel/toolchain/runtimes.sh+++ b/store/agents/strudel/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/text-to-cad/toolchain/runtimes.sh b/store/agents/text-to-cad/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/text-to-cad/toolchain/runtimes.sh+++ b/store/agents/text-to-cad/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/trailofbits-skills/toolchain/runtimes.sh b/store/agents/trailofbits-skills/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/trailofbits-skills/toolchain/runtimes.sh+++ b/store/agents/trailofbits-skills/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/voxel-worlds/toolchain/runtimes.sh b/store/agents/voxel-worlds/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/voxel-worlds/toolchain/runtimes.sh+++ b/store/agents/voxel-worlds/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/agents/yosys/toolchain/runtimes.sh b/store/agents/yosys/toolchain/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/agents/yosys/toolchain/runtimes.sh+++ b/store/agents/yosys/toolchain/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/tools/runtimes.sh b/store/tools/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/tools/runtimes.sh+++ b/store/tools/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/tools/test_runtimes.py b/store/tools/test_runtimes.pyindex 320b44b61..fffe4fe5c 100644--- a/store/tools/test_runtimes.py+++ b/store/tools/test_runtimes.py@@ -129,6 +129,12 @@ class Checksum(unittest.TestCase):self.assertEqual(box.run('_harness_sha256 f').stdout.strip(), "bbb")self.assertIn("sha256sum f", box.logged())+ def test_a_locale_the_machine_lacks_does_not_reach_the_tool(self):+ box = Box(self)+ (box.root / "f").write_text("x")+ box.stub("shasum", '[ "$LC_ALL" = C ] || exit 255; echo "aaa f"')+ self.assertEqual(box.run('_harness_sha256 f', LC_ALL="C.UTF-8").stdout.strip(), "aaa")+class Fetch(unittest.TestCase):def test_a_download_that_fails_leaves_nothing(self):@@ -146,6 +152,14 @@ class Fetch(unittest.TestCase):self.assertEqual(lines(r), ["miss https://example.com/x did not match its pinned checksum; nothing was installed", "rc=1"])self.assertFalse(any(p.name.startswith("x") for p in box.root.iterdir()))+ def test_a_checksum_tool_that_prints_nothing_is_not_a_mismatch(self):+ box = Box(self)+ box.serve(b"payload")+ box.stub("shasum", "exit 255")+ r = box.run('_harness_fetch https://example.com/x "$PWD/x" abc || echo "rc=$?"')+ self.assertEqual(lines(r), ["miss could not checksum https://example.com/x — shasum and sha256sum both failed on this machine; nothing was installed", "rc=1"])+ self.assertFalse(any(p.name.startswith("x") for p in box.root.iterdir()))+def test_a_matching_download_lands(self):box = Box(self)box.serve(b"payload")diff --git a/store/viewers/cad-viewer/runtimes.sh b/store/viewers/cad-viewer/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/viewers/cad-viewer/runtimes.sh+++ b/store/viewers/cad-viewer/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/viewers/doc-viewer/runtimes.sh b/store/viewers/doc-viewer/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/viewers/doc-viewer/runtimes.sh+++ b/store/viewers/doc-viewer/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/viewers/film-viewer/runtimes.sh b/store/viewers/film-viewer/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/viewers/film-viewer/runtimes.sh+++ b/store/viewers/film-viewer/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/viewers/game-viewer/runtimes.sh b/store/viewers/game-viewer/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/viewers/game-viewer/runtimes.sh+++ b/store/viewers/game-viewer/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/viewers/isolated-web-viewer/runtimes.sh b/store/viewers/isolated-web-viewer/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/viewers/isolated-web-viewer/runtimes.sh+++ b/store/viewers/isolated-web-viewer/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/viewers/model-viewer/runtimes.sh b/store/viewers/model-viewer/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/viewers/model-viewer/runtimes.sh+++ b/store/viewers/model-viewer/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/viewers/mujoco-viewer/runtimes.sh b/store/viewers/mujoco-viewer/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/viewers/mujoco-viewer/runtimes.sh+++ b/store/viewers/mujoco-viewer/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/viewers/studio-viewer/runtimes.sh b/store/viewers/studio-viewer/runtimes.shindex 7223c78dc..f9e5d71ba 100755--- a/store/viewers/studio-viewer/runtimes.sh+++ b/store/viewers/studio-viewer/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/viewers/video-viewer/runtimes.sh b/store/viewers/video-viewer/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/viewers/video-viewer/runtimes.sh+++ b/store/viewers/video-viewer/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"diff --git a/store/viewers/web-viewer/runtimes.sh b/store/viewers/web-viewer/runtimes.shindex 7223c78dc..f9e5d71ba 100644--- a/store/viewers/web-viewer/runtimes.sh+++ b/store/viewers/web-viewer/runtimes.sh@@ -45,9 +45,10 @@ _harness_platform() {esac}+# shasum is Perl, and Perl panics and prints nothing under a locale the machine lacks (LC_ALL=C.UTF-8 on macOS)._harness_sha256() {- if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1- else sha256sum "$1" | cut -d' ' -f1; fi+ if command -v shasum >/dev/null 2>&1; then LC_ALL=C shasum -a 256 "$1" | cut -d' ' -f1+ else LC_ALL=C sha256sum "$1" | cut -d' ' -f1; fi}# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.@@ -56,7 +57,11 @@ _harness_fetch() {if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; thenrm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1fi- if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ local sum; sum="$(_harness_sha256 "$part" 2>/dev/null || true)"+ if [ -z "$sum" ]; then+ rm -f "$part"; echo "miss could not checksum $1 — shasum and sha256sum both failed on this machine; nothing was installed"; return 1+ fi+ if [ "$sum" != "$3" ]; thenrm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1fimv -f "$part" "$2"