From 1d44c26894ec84349580c85541f5be52a09f0026 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Ricau Date: Wed, 4 Mar 2026 13:05:44 -0500 Subject: [PATCH] fix(penpal): fail fast with helpful error when Warp is not connected Adds a _check-warp recipe that tests reachability of global.block-artifacts.com before install runs. Without Warp, pnpm install would silently retry and eventually fail with confusing ECONNRESET errors. Co-Authored-By: Claude Sonnet 4.6 --- apps/penpal/justfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/penpal/justfile b/apps/penpal/justfile index 58a14dec..4435388c 100644 --- a/apps/penpal/justfile +++ b/apps/penpal/justfile @@ -3,6 +3,15 @@ default: dev export PATH := env_var_or_default("CARGO_HOME", env_var("HOME") + "/.cargo") + "/bin:" + env_var("PATH") +# Check that Block's internal network is reachable (requires Warp to be connected) +_check-warp: + #!/usr/bin/env bash + if ! curl -sf --max-time 5 --head https://global.block-artifacts.com -o /dev/null 2>/dev/null; then + echo "Error: Block's internal network is unreachable." >&2 + echo "Turn on Warp before running this command." >&2 + exit 1 + fi + # Ensure required tools are installed ensure-deps: #!/usr/bin/env bash @@ -40,7 +49,7 @@ build-go: ensure-deps ./scripts/build-go.sh # Install Penpal: build dev-branded desktop app and copy to /Applications -install: ensure-deps build-go +install: _check-warp ensure-deps build-go #!/usr/bin/env bash set -euo pipefail