mirror of
https://github.com/samvallad33/vestige.git
synced 2026-07-26 23:51:02 +02:00
fix(npm): stop rejecting INSTALL-INTEL-MAC.md in the release tarball
The x86_64-apple-darwin release tarball packages INSTALL-INTEL-MAC.md (release.yml), but postinstall's strict archive-member check only accepted the three binaries — so npm install hard-failed on every Intel Mac with 'Unexpected archive entry'. Known-optional docs are now accepted; genuinely unknown entries are still rejected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
89b0b35665
commit
e95ab05d4a
1 changed files with 4 additions and 1 deletions
|
|
@ -60,6 +60,9 @@ const checksumPath = path.join(targetDir, `${archiveName}.sha256`);
|
|||
const expectedArchiveMembers = new Set(
|
||||
['vestige-mcp', 'vestige', 'vestige-restore'].map((name) => (isWindows ? `${name}.exe` : name))
|
||||
);
|
||||
// Docs that some release archives legitimately include alongside the binaries
|
||||
// (e.g. the x86_64-apple-darwin tarball ships INSTALL-INTEL-MAC.md).
|
||||
const optionalArchiveMembers = new Set(['INSTALL-INTEL-MAC.md']);
|
||||
|
||||
function isWorkspaceCheckout() {
|
||||
const packageRoot = path.resolve(__dirname, '..');
|
||||
|
|
@ -183,7 +186,7 @@ function validateArchiveEntries(archivePath) {
|
|||
|
||||
for (const entry of entries) {
|
||||
const normalized = normalizeArchiveEntry(entry);
|
||||
if (!expectedArchiveMembers.has(normalized)) {
|
||||
if (!expectedArchiveMembers.has(normalized) && !optionalArchiveMembers.has(normalized)) {
|
||||
throw new Error(`Unexpected archive entry: ${entry}`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue