fix(macos): sanitize Homebrew installer environment - #5
Draft
agiletalk wants to merge 1 commit into
Draft
Conversation
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.
Summary
--yesnon-interactive while allowing the normalcurl | bashpath to prompt through/dev/ttyVERSIONwith the next patch after the currentv0.10.7releaseRoot cause
The prerequisites step always launched Homebrew with
NONINTERACTIVE=1, so a fresh interactive Mac could not authorize Homebrew's administrator operation. The first attempted fix addedINTERACTIVE=1, but Homebrew explicitly aborts when that variable is combined with an inheritedCIorNONINTERACTIVEvalue.This version launches Homebrew in isolated subshells:
CIandNONINTERACTIVE, exports onlyINTERACTIVE=1, and connects stdin to/dev/tty--yes: removes an inheritedINTERACTIVEvalue and exportsNONINTERACTIVE=1The caller's environment remains unchanged.
Follow-up to PR #4 feedback
CI+INTERACTIVEandNONINTERACTIVE+INTERACTIVEabort conditions.mainatv0.10.7; the stale0.9.1change is replaced with0.10.8.tests/homebrew-installer.shruns in the Ubuntu lint job and themacos-14dry-run job, so the BSDscriptbranch is exercised on macOS.User impact
A normal one-line install can now let the official Homebrew installer request the Mac administrator password once. lazy-starter-kit itself still does not invoke a separate
sudocommand. Automated--yesruns remain prompt-free.Validation
tests/homebrew-installer.shtests/macos-existing-home.shtests/zdotdir-existing-home.shtests/safe-recursive-delete.shtests/ai-shell-guard.shtests/release-signing.shThe new macOS TTY regression is wired into GitHub Actions and must be confirmed by the
macos-14runner.