Fix quick install on macOS, replace deprecated chromium cask, add install.sh tests - #4
Merged
Merged
Conversation
…works on both Linux and BSD based OS (incl macOS).
…s its set to be disabled on 2026-09-01.
… platform detection, browser detection & error messaging. Tests run in CI on both Ubuntu and macOS via a new workflow so that BSD/GNU tool differences like the one in issue #3 are caught before release. Made `install.sh` sourceable via an env guard so tests can call its functions & added a `make test-install` target to run the suite locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3 — the quick install failed on macOS because the version-parsing sed pattern used the GNU-only
\sclass, which BSD sed doesn't support. The substitution silently passed the raw JSON line through as the version, producing a malformed download URL. Replaced with the POSIX[[:space:]]class, which behaves identically on GNU sed (Linux).Also included:
chromiumHomebrew cask withgoogle-chromeon macOS. The chromium cask fails Gatekeeper (unsigned build) and will be disabled by Homebrew on 2026-09-01, after which browser auto-install on macOS would break entirely. Linux is unaffected — distro chromium packages are maintained and stay as-is.browser_requiredhelper. It now states that Chrome/Chromium is a requirement of mmd-cli and tells the user to re-run the installer after installing one.install.sh(test/install_test.sh) covering release version parsing, platform detection, browser detection, and error messaging, with a fixture of the real GitHub API response.install.shis now sourceable via an env guard so tests can call its functions; no behavior change forcurl | shusers.install-test.yml) runs shellcheck and the suite on both Ubuntu and macOS — the macOS leg (BSD sed/grep) is the coverage that would have caught this bug before release. Existing Go test workflow is untouched. Also addedmake test-installto run the suite locally.Verified: all tests pass on macOS (BSD sed); reintroducing the
\spattern in a scratch copy makes the regression test fail with the exact symptom reported in #3. Since the quick-install command curlsinstall.shfrommaster, merging this ships the fix — no release required.