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

This commit is contained in:
Jérôme Benoit
2026-01-13 01:18:48 +01:00
committed by GitHub
parent 498a4ab408
commit d839f70834
2 changed files with 4 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ HASH_FILE=${HASH_FILE:-$DEFAULT_HASH_FILE}
if [ ! -f "$HASH_FILE" ]; then
cat >"$HASH_FILE" <<EOF
{
"nodeModules": "$DUMMY"
"nodeModules": {}
}
EOF
fi
@@ -111,7 +111,7 @@ fi
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"