The open source coding agent.
TypeScript
fix(ci): portable hash parsing in nix-hashes workflow (#11533)
Jérôme Benoit0961632a9c9d
diff --git a/.github/workflows/nix-hashes.yml b/.github/workflows/nix-hashes.ymlindex bb4db70882b..caf94e1400f 100644--- a/.github/workflows/nix-hashes.yml+++ b/.github/workflows/nix-hashes.yml@@ -58,10 +58,8 @@ jobs:# Build with fakeHash to trigger hash mismatch and reveal correct hashnix build ".#packages.${SYSTEM}.node_modules_updater" --no-link 2>&1 | tee "$BUILD_LOG" || true- HASH="$(grep -E 'got:\s+sha256-' "$BUILD_LOG" | sed -E 's/.*got:\s+(sha256-[A-Za-z0-9+/=]+).*/\1/' | head -n1 || true)"- if [ -z "$HASH" ]; then- HASH="$(grep -A2 'hash mismatch' "$BUILD_LOG" | grep 'got:' | sed -E 's/.*got:\s+(sha256-[A-Za-z0-9+/=]+).*/\1/' | head -n1 || true)"- fi+ # Extract hash from build log with portability+ HASH="$(grep -oE 'sha256-[A-Za-z0-9+/=]+' "$BUILD_LOG" | tail -n1 || true)"if [ -z "$HASH" ]; thenecho "::error::Failed to compute hash for ${SYSTEM}"