OverviewFilesCommitsIssuesDocsReleasesPeers

pgh commits / 6d4d291

0.1.154: build-bootstrap-bare refuses an unknown flag instead of ignoring it
These builders are COPIED per bootstrap app, so a stale copy silently ignoring a new flag yields a confidently wrong artifact — which is how a --extra-arch build produced a single-arch tree and still reported success. Found uncommitted in the working tree from an earlier session; committed as its own change with its own version rather than folded into an unrelated one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
6d4d291255a11a811bb98fcda88812c4b0bfc83f
by plankatron <fleeky@gmail.com> · 2026-09-15T18:27:39.000Z

Changed files (3) +19 -3

package-lock.json +2 -2
……@@ -1,12 +1,12 @@
11{
22 "name": "pgh",
3 "version": "0.1.126",
3 "version": "0.1.151",
44 "lockfileVersion": 3,
55 "requires": true,
66 "packages": {
77 "": {
88 "name": "pgh",
9 "version": "0.1.126",
9 "version": "0.1.151",
1010 "license": "AGPL-3.0",
1111 "dependencies": {
1212 "autobase": "^7.0.0",
package.json +1 -1
……@@ -1,6 +1,6 @@
11{
22 "name": "pgh",
3 "version": "0.1.153",
3 "version": "0.1.154",
44 "description": "pgh \u2014 P2P content-addressed package manager and app launcher",
55 "type": "module",
66 "main": "index.js",
scripts/build-bootstrap-bare.js +16 -0
……@@ -49,6 +49,22 @@ function archLabel (platform, arch) {
4949 return (osMap[platform] || platform) + '-' + (archMap[arch] || arch)
5050}
5151
52const KNOWN_FLAGS = new Set(['root', 'os', 'arch', 'out', 'stage-out', 'extra-arch'])
53for (let i = 2; i < process.argv.length; i++) {
54 const a = process.argv[i]
55 if (!a.startsWith('--')) continue
56 const name = a.slice(2).split('=')[0]
57 if (!KNOWN_FLAGS.has(name)) {
58 // Loud on purpose. These builders are COPIED per bootstrap app, so a stale
59 // copy silently ignoring a new flag yields a confidently wrong artifact —
60 // exactly how a --extra-arch build produced a single-arch tree that still
61 // reported success.
62 console.error('error: unknown flag ' + a + ' — this build-bootstrap-bare.js is probably stale.')
63 console.error(' Known flags: --' + [...KNOWN_FLAGS].join(' --'))
64 process.exit(1)
65 }
66}
67
5268const OS = getFlag('os', os.platform())
5369const ARCH = getFlag('arch', os.arch())
5470const LABEL = archLabel(OS, ARCH)