Skip to content

chore(repo): make release scripts pure ASCII and guard in CI#89

Merged
sepehr-safari merged 1 commit into
mainfrom
chore/scripts-pure-ascii
Jul 13, 2026
Merged

chore(repo): make release scripts pure ASCII and guard in CI#89
sepehr-safari merged 1 commit into
mainfrom
chore/scripts-pure-ascii

Conversation

@sepehr-safari

Copy link
Copy Markdown
Member

What

Make all three release scripts pure ASCII, and add a CI guard so they stay that way.

scripts/install-macos.sh is piped straight into bash via the documented
one-liner. Non-ASCII in a curl | bash script is a latent hazard:

  • macOS ships bash 3.2.57 as /bin/bash. Under set -u, a multibyte
    character directly against a $variable (e.g. "$dest…") folds into the
    variable name → unbound variable → the install aborts.
  • Under a non-UTF-8 locale, non-ASCII in emitted strings prints as mojibake in a
    script the user is trusting with sudo.

The scripts were only at the cosmetic tier (em-dashes in printf/echo output
and comments, none adjacent to a variable), but the gap to the fatal tier is one
careless edit. This removes the hazard class rather than policing it by hand.

Changes

  • install-macos.sh, package-macos.sh, smoke.sh: em-dash → -, ellipsis →
    ..., arrow → ->, spacing preserved. No behavior change.
  • New CI job scripts (pure ASCII) fails on any non-ASCII byte in scripts/*.sh.

Verification

  • LC_ALL=C scan of scripts/*.sh: zero non-ASCII bytes.
  • bash -n clean on all three; shellcheck clean; actionlint clean.
  • Guard self-tested both ways: passes on the ASCII tree, flags an injected byte.
  • The installer is served from main, so this reaches new installs on merge — no
    release required.

Closes #88

The macOS one-line installer (install-macos.sh) is fetched and run via
`curl | bash`, so it must survive the oldest bundled bash. A non-ASCII byte
next to a $variable under `set -u` on macOS's bash 3.2.57 folds into the
variable name and aborts the install; in any non-UTF-8 locale, non-ASCII in
emitted strings prints as mojibake.

Replace the em-dashes, ellipsis, and arrows in install-macos.sh,
package-macos.sh, and smoke.sh with ASCII equivalents (spacing preserved),
and add a CI job that fails on any non-ASCII byte in scripts/*.sh so it
cannot regress.
@sepehr-safari sepehr-safari merged commit 3841b0b into main Jul 13, 2026
4 checks passed
@sepehr-safari sepehr-safari deleted the chore/scripts-pure-ascii branch July 13, 2026 00:13
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.

chore(repo): release scripts should be pure ASCII (curl | bash portability)

1 participant