Skip to content

fix(install): install.sh takes --option value, exits with a status for each cause, and narrates and traps with Declare-BashScript's functions - #1039

Merged
David-Noble-at-work merged 5 commits into
developfrom
chore/1037-install-sh-embeds-declare
Oct 10, 2026
Merged

David-Noble-at-work merged 5 commits into
developfrom
chore/1037-install-sh-embeds-declare

Conversation

@David-Noble-at-work

@David-Noble-at-work David-Noble-at-work commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • make check on Danoble-MBP-A at each of the four commits
  • The suite, 288 of 288: on this Mac under macOS's own bash 3.2.57 and tools; with MacPorts' tools first (--keep-path); on danoble-ud24-1.local (bash 5.3.9) against this branch's linux/arm64 archive
  • install.sh under bash 3.2.57 and 5.3.20 on this Mac and Git Bash 5.3.15 on danoble-wd11-3: a value-less option refused with 64, both forms parsed, and Windows refused with 78 before any download
  • This branch's install.sh piped into bash on danoble-ud24-1.local under a scratch HOME: the newest release installed and verified, nothing registered, TMPDIR left empty
  • CI on this pull request, every installers leg

Plan: docs/plans/chore/1037-install-sh-embeds-declare.md. Lanes 62 and 64 of #916. Next: Start-Claude and Start-Claude.ps1, then the settings rollup, lane 8 (#927).

Resolves #1037
Resolves #1038

Written with AI assistance.

Signed-off-by: David Noble [email protected]
Assisted-by: Claude Code

Time

Marker UTC Elapsed
opened (first commit) 2026-10-10T05:31:59Z —
submitted (PR opened) 2026-10-10T19:52:48Z 14.3 h after opened
merged 2026-10-10T20:09:29Z 0.3 h after submitted; 14.6 h in all

Computed by the algorithm of noblefactor-ops#188 at merge.

…ci-lint v2.14.0 (#1037)

Lanes 62 and 64 of #916, for #1037 and #1038. The draft plan: install.sh carries the helper's
narration and handler and takes its four options with or without '='; Test-InstallScript.sh and generate-portfile.sh
embed the helper whole; one pinned commit of the helper feeds every copy, and make check fails when one drifts.
install.sh stops with the helper's status for each cause, as the owner ruled 2026-10-09. One question remains: the CI
the two tools then need.

The installers' requirements are stated in the plan and in the command-line design's section 2: each runs with what
ships with its operating system. install.sh with macOS's /bin/bash 3.2 and its own tools, as the owner ruled
2026-10-09; install.ps1 with Windows PowerShell 5.1 and PowerShell 7 alike, as ruled 2026-09-24.

golangci-lint's pin moves from v2.13.2 to v2.14.0, part of #1020, ruled 2026-10-09: "update to 2.14 everywhere".
v2.13.2 cannot read Go 1.27.2's standard library ("export data version 5 is greater than maximum supported version
4"); CI installs the pinned version, and this Mac, danoble-ud24-1 and danoble-wd11-3 run it. Its gocritic flags two
formats in writ's migrate session that wrap a path in back quotes by hand; each takes %#q, which prints the same
back-quoted path, and a double-quoted one when the path itself holds a back quote.
…re-BashScript's functions (#1037)

Phase 3 of lanes 62 and 64 of #916. scripts/Test-InstallScript.sh and
packaging/macports/generate-portfile.sh carry the helper's note, success, error, on_error_or_interrupt and Set-Traps,
byte-identical to NobleFactor/noblefactor-ops c942f54's, with the exit statuses each uses, copied by hand: nothing
sources or embeds the helper, as the owner ruled 2026-10-09 and 2026-10-10. Each keeps its own option parsing, so
each runs where it runs today, and CI stays as it is.

The suite reports each check in the helper's form and exits 1 when one fails, 64 on a usage error, 66 when
DEVLORE_TEST_DIST lacks this platform's archive, and 70 when make dist fails; its trap is Set-Traps with a cleanup
that removes its scratch directory. Its 13 old lines over 120 columns are wrapped, every string they hold unchanged;
one line of fixture data, GitHub's own rate-limit message, stays as GitHub sends it. It passed all 249 checks on this
Mac, install.sh under macOS's own bash and tools. generate-portfile.sh wrote the Portfile for
v0.1.0-dev.20261005182840.

The plan records the rulings and the approval: the generator, pin and drift check are gone, the two tools carry the
helper's functions rather than the helper, the CI change it needed is moot, and phases 1 to 3 are ticked. The
command-line design says install.sh carries copies of the helper's functions, made by hand, and section 9 names its
exit statuses.
…s, and takes both option forms (#1037, #1038)

Phase 4 of lanes 62 and 64 of #916. install.sh carries the helper's note, success, error,
on_error_or_interrupt and Set-Traps, as NobleFactor/noblefactor-ops c942f54 has them, copied by hand, with the six
exit statuses it uses: it sources nothing, carries none of the helper's checks for bash 5.3 or GNU getopt, and runs
with what ships with macOS. Its narration moves to stderr in the helper's form, its warning is error 0, and each
refusal exits with the status of its cause, as ruled 2026-10-09: 64 a usage error; 65 an archive it cannot verify; 69
a missing tool, or GitHub refusing a request, serving a file by another name, or lacking the release; 70 a failed self
install; 75 GitHub's spent rate limit; 78 an unsupported platform.

Each of --prefix, --base, --team and --personal takes its value as --option value or as --option=value, and one given
last with no value is refused by name with 64 (#1038), in a loop that runs on bash 3.2. The usage says both forms and
the statuses.

The suite's refusals each expect their status, and it passed all 249 checks on this Mac, install.sh under macOS's own
bash and tools; under /bin/bash 3.2.57 and bash 5.3.20 alike, install.sh refuses as it should. The plan ticks phase 4,
separates its table of statuses from the paragraph after it, and names a file served by another name under 69.
…stall.sh exits with (#1037, #1038)

Phase 5 of lanes 62 and 64 of #916. scripts/Test-InstallScript.sh now checks each of
--prefix, --base, --team and --personal given last with no value, refused with 64 by name before any download;
--base in the space form; an architecture other than amd64 and arm64, 78; a self install that fails, 70, under a
prefix whose bin is not writable, as /usr/local/bin is without sudo; an archive with no program DEVLORE_TOOLS names,
65; and --prefix, --personal and --team in the space form installing and registering what the = form does, and
--prefix= too. Every message it checks is matched in the helper's form, note's, success's or error's. It passed all
288 of its checks on this Mac, install.sh under macOS's own bash and tools.

The getting-started guide shows both forms of each bash flag, and its install command is wrapped to 120 columns. The
command-line design's section 2 says install.sh takes both and refuses a value-less option by name, and its status
page records the revisions of sections 2 and 9. The plan ticks phase 5, lists the two documents, and shortens its
title to 110 columns: at 147 it broke the 120-column rule, reported as anthropics/claude-code#101106.
…e 7 close with the pull request (#1037)

The suite passed all 288 checks on this Mac with macOS's own tools and with MacPorts', and on danoble-ud24-1.local
against this branch's linux/arm64 archive; install.sh, piped into bash there under a scratch HOME, installed the newest
release and registered nothing; and under danoble-wd11-3's Git Bash it refused a value-less option and the platform.
The next devlore-cli pull request ticks the CI box and phase 7, as plan 289's were.
@David-Noble-at-work David-Noble-at-work self-assigned this Oct 10, 2026
@David-Noble-at-work
David-Noble-at-work merged commit 4d18e48 into develop Oct 10, 2026
21 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the chore/1037-install-sh-embeds-declare branch October 10, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant