fix(nix): initialize hashes.json with per-system format (#8095)

pull/7584/head
Jérôme Benoit 2026-01-13 01:18:48 +01:00 committed by GitHub
parent 498a4ab408
commit d839f70834
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{ {
"nodeModules": { "nodeModules": {
"x86_64-linux": "sha256-8nur5CuUCSV/SzD16hNXVoIlKsiPBXDzCnoITK0IhC4=", "x86_64-linux": "sha256-UCPTTk4b7d2bets7KgCeYBHWAUwUAPUyKm+xDYkSexE=",
"aarch64-darwin": "sha256-vD1g9dviI2nMBTTPwI87sK01hSZ+cdnmb1V72AdJYq4=" "aarch64-darwin": "sha256-Y3o6lovahSWoG9un/l1qxu7hCmIlZXm2LxOLKNiPQfQ="
} }
} }

View File

@ -10,7 +10,7 @@ HASH_FILE=${HASH_FILE:-$DEFAULT_HASH_FILE}
if [ ! -f "$HASH_FILE" ]; then if [ ! -f "$HASH_FILE" ]; then
cat >"$HASH_FILE" <<EOF cat >"$HASH_FILE" <<EOF
{ {
"nodeModules": "$DUMMY" "nodeModules": {}
} }
EOF EOF
fi fi
@ -111,7 +111,7 @@ fi
write_node_modules_hash "$CORRECT_HASH" write_node_modules_hash "$CORRECT_HASH"
jq -e --arg hash "$CORRECT_HASH" '.nodeModules == $hash' "$HASH_FILE" >/dev/null jq -e --arg system "$SYSTEM" --arg hash "$CORRECT_HASH" '.nodeModules[$system] == $hash' "$HASH_FILE" >/dev/null
echo "node_modules hash updated for ${SYSTEM}: $CORRECT_HASH" echo "node_modules hash updated for ${SYSTEM}: $CORRECT_HASH"