fix: checagem real do git no preflight (shim do Xcode no macOS + PATH pós-winget no Windows) - #15
Merged
Merged
Conversation
…H pós-winget no Windows
- gitWorks(): valida com `git --version`, não só `which git` — num Mac limpo
o /usr/bin/git é apenas o shim do Xcode CLT e a checagem antiga dava falso
positivo ("Git installed." sem git de verdade)
- manualHint no Mac sem brew sugere `xcode-select --install`
- refreshWindowsPath(): winget/choco atualizam o PATH no registro, não no
processo em execução — anexa os diretórios conhecidos (Git\cmd, GitHub CLI)
ao PATH do run atual para a verificação pós-install não falhar
- installOrInstruct ganha `verify` (reconferência manual usa o probe real)
- testes: planos de install do git no Windows (winget Git.Git / choco) e
Mac sem brew → caminho manual
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
elberrd
added a commit
that referenced
this pull request
Aug 14, 2026
…t real (#16) Bump de release para publicar a logo oficial no README (#12), o relay off respeitado no resume (#13), os achados do double-check (#14) e a checagem real do git no preflight — shim do Xcode no macOS + PATH pós-winget no Windows (#15). Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Resumo
O preflight já checava/instalava o git, mas tinha dois furos reais exatamente no macOS e no Windows:
Falso positivo no macOS limpo: todo Mac recém-formatado tem
/usr/bin/git— mas é só o shim do Xcode Command Line Tools.which gitpassava, a CLI dizia "Git installed." e o aluno quebrava lá na frente nogit init. AgoragitWorks()valida comgit --versionde verdade (e, sem CLT, o próprio macOS abre o diálogo nativo de instalação). Mac sem brew ganhamanualHintcomxcode-select --install.PATH velho no Windows pós-winget:
winget install Git.Gitatualiza o PATH no registro, mas não no processo em execução — a verificação pós-install falharia mesmo com install ok.refreshWindowsPath()anexa os diretórios conhecidos (C:\Program Files\Git\cmd, GitHub CLI) aoprocess.env.PATHdo run atual; os filhos herdam.De quebra,
installOrInstructganhou o parâmetroverify— a reconferência pós-confirmação manual também usa o probe real, não sówhich.Testes
installPlan: git no Windows via winget (Git.Git) e choco; gh no winget (GitHub.cli); Mac sem brew →null(caminho manual).npm test: 722 pass, 0 fail.npm run lintlimpo.🤖 Generated with Claude Code