Skip to content

Quality CI fails with `chezmoi: command not found`

Source: Troubleshooting reference

Symptom: The fast Bats profile-rendering test exits 127, while the Docker bootstrap jobs pass.

Root cause: The Quality job runs directly on the hosted runner. Unlike the bootstrap container, it did not install chezmoi before rendering login profiles.

Confirm: Check the failed step for tests/profiles.bats and the missing chezmoi command; this is a test-environment dependency failure.

Fix: The Quality job installs a pinned, checksum-verified chezmoi release binary into its tool directory before running Bats. It also installs zsh because the test sources both bash and zsh profiles. Keep these dependencies in .github/workflows/ci.yml; do not skip the rendering test. Use the release binary because this chezmoi version’s Go module has exclude directives and cannot be installed with go install github.com/twpayne/chezmoi/v2@version.