Skip to content

fix: make install.ps1 fail closed on checksums - #18

Merged
catinspace-au merged 1 commit into
mainfrom
fix/ps1-fail-closed
Oct 14, 2026
Merged

catinspace-au merged 1 commit into
mainfrom
fix/ps1-fail-closed

Conversation

@catinspace-au

Copy link
Copy Markdown
Contributor

install.ps1 still carried catch { # checksums file is optional }, so it installed an unverified binary whenever the sums file was missing or did not name the asset. install.sh stopped doing that in #16. This brings the Windows installer into line and picks up the other follow-ups.

  • install.ps1 now refuses: no sums file, a sums file without the asset, a malformed or duplicate entry, a mismatch or a download error all throw and install nothing
  • lookup is macbash-windows-<arch>.sha256 first (Cross-build writes it without the .exe), then checksums.sha256, exact asset name, case included
  • tests/install_ps1.rs runs the rendered script under pwsh against a loopback host, 10 cases. Against the old script 9 of them fail
  • the tests skip, and say so, when pwsh is not on PATH
  • the loopback server moves to tests/common so install_sh.rs and install_ps1.rs share it
  • .hyperi-ci.yaml: build.rust.optimize.allocator: system clears the "jemalloc feature not declared" warning, since Cargo.toml has no jemalloc feature and this is a short-lived CLI
  • packaging/README.md: macOS and Windows builds ship
  • docs/release.md and the cross-build.yml header said [skip ci] stops the tag push starting Cross-build. It does not. v1.5.11 got a push run (38499786588) because the tag points at 3d39ab9, and the [skip ci] is on the chore commit after it

Not covered: Windows PowerShell 5.1 and a real Windows host. Tested on pwsh 7.6.6 on Linux.

install.ps1 installed whatever it downloaded when the sums file was missing, did not name the asset or could not be fetched. It now refuses, the way install.sh does.

- looks for macbash-windows-<arch>.sha256 first (what Cross-build publishes), then checksums.sha256, and matches the asset name exactly, case included
- a missing sums file, a sums file without the asset, a malformed or duplicate entry, a mismatch or a download error throws and installs nothing
- tests/install_ps1.rs runs the rendered script under pwsh against a loopback host, and skips when pwsh is not on PATH
- the loopback server and which() move from tests/install_sh.rs into tests/common so both installer tests share them
- .hyperi-ci.yaml sets build.rust.optimize.allocator: system, since Cargo.toml declares no jemalloc feature and every build warned and fell back
- packaging/README.md: macOS and Windows builds ship
- docs/release.md and the cross-build.yml header: the tag push does start Cross-build, because the tag sits on the released commit and the skip-ci mark is on the chore commit after it
@catinspace-au
catinspace-au merged commit 1b4501b into main Oct 14, 2026
18 checks passed
@catinspace-au
catinspace-au deleted the fix/ps1-fail-closed branch October 14, 2026 05:46
@github-actions

Copy link
Copy Markdown

Released in v1.5.12 -- https://github.com/hyperi-io/macbash/releases/tag/v1.5.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant