We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents abbf600 + 9a122e2 commit 6f1c055Copy full SHA for 6f1c055
1 file changed
.github/workflows/nix-hashes.yml
@@ -58,10 +58,8 @@ jobs:
58
# Build with fakeHash to trigger hash mismatch and reveal correct hash
59
nix build ".#packages.${SYSTEM}.node_modules_updater" --no-link 2>&1 | tee "$BUILD_LOG" || true
60
61
- HASH="$(grep -E 'got:\s+sha256-' "$BUILD_LOG" | sed -E 's/.*got:\s+(sha256-[A-Za-z0-9+/=]+).*/\1/' | head -n1 || true)"
62
- if [ -z "$HASH" ]; then
63
- HASH="$(grep -A2 'hash mismatch' "$BUILD_LOG" | grep 'got:' | sed -E 's/.*got:\s+(sha256-[A-Za-z0-9+/=]+).*/\1/' | head -n1 || true)"
64
- fi
+ # Extract hash from build log with portability
+ HASH="$(grep -oE 'sha256-[A-Za-z0-9+/=]+' "$BUILD_LOG" | tail -n1 || true)"
65
66
if [ -z "$HASH" ]; then
67
echo "::error::Failed to compute hash for ${SYSTEM}"
0 commit comments