Skip to content

Fix quick install on macOS, replace deprecated chromium cask, add install.sh tests - #4

Merged
coolamit merged 6 commits into
masterfrom
feature/installation-script-update
Jul 29, 2026
Merged

coolamit merged 6 commits into
masterfrom
feature/installation-script-update

Conversation

@coolamit

@coolamit coolamit commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Fixes #3 — the quick install failed on macOS because the version-parsing sed pattern used the GNU-only \s class, 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:

  • Replaced the deprecated chromium Homebrew cask with google-chrome on 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.
  • Unified the "browser not found" error messaging for Linux and macOS into a single browser_required helper. It now states that Chrome/Chromium is a requirement of mmd-cli and tells the user to re-run the installer after installing one.
  • Added a dependency-free POSIX sh test suite for 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.sh is now sourceable via an env guard so tests can call its functions; no behavior change for curl | sh users.
  • New CI workflow (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 added make test-install to run the suite locally.

Verified: all tests pass on macOS (BSD sed); reintroducing the \s pattern in a scratch copy makes the regression test fail with the exact symptom reported in #3. Since the quick-install command curls install.sh from master, merging this ships the fix — no release required.

coolamit added 6 commits July 29, 2026 16:48
…works on both Linux and BSD based OS (incl macOS).
… 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.
@coolamit
coolamit merged commit 9d07389 into master Jul 29, 2026
6 checks passed
@coolamit
coolamit deleted the feature/installation-script-update branch July 29, 2026 14:59
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.

Error using quick install: curl: (3) URL rejected: Malformed input to a URL function

1 participant