chore(repo): make release scripts pure ASCII and guard in CI#89
Merged
Conversation
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.
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.
What
Make all three release scripts pure ASCII, and add a CI guard so they stay that way.
scripts/install-macos.shis piped straight intobashvia the documentedone-liner. Non-ASCII in a
curl | bashscript is a latent hazard:/bin/bash. Underset -u, a multibytecharacter directly against a
$variable(e.g."$dest…") folds into thevariable name → unbound variable → the install aborts.
script the user is trusting with
sudo.The scripts were only at the cosmetic tier (em-dashes in
printf/echooutputand 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.scripts/*.sh.Verification
LC_ALL=Cscan ofscripts/*.sh: zero non-ASCII bytes.bash -nclean on all three;shellcheckclean;actionlintclean.main, so this reaches new installs on merge — norelease required.
Closes #88