You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macOS bootstrap: install Xcode Command Line Tools before chezmoi needs git #22
Found during the fresh-macOS install documented in #20.
Problem
On a brand-new Mac, chezmoi init --apply jdevera fails almost immediately:
xcode-select: note: No developer tools were found, requesting install.
chezmoi: git: exit status 1
chezmoi needs git (e.g. to clone the source repo and fetch git externals), but git only exists once the Xcode Command Line Tools are installed.
Root cause
The Xcode CLT install lives in home/.chezmoiscripts/run_once_after_010-install-homebrew.sh.tmpl, which is a run_once_after_ script — it runs after chezmoi has already applied state and used git. By then it's too late.
Suggested direction
Install the Xcode CLT (or at least ensure git is available) as a pre-source / pre-apply hook that runs before chezmoi touches git — e.g. a .chezmoiscripts/run_before_* step, or folded into home/.install-one-password.sh / the site/install bootstrap. The Homebrew script can keep its idempotent "already installed" check.
Activity