Found during the fresh-macOS install documented in #20.
Problem
The "install packages" step fails on a fresh machine:
✓ Step 2: did install formulae and casks
✗ Error: commands not found: yq
chezmoi: .chezmoiscripts/035-install-packages.sh: exit status 1
yq (and jq) are needed by the package installer, but they're listed as ordinary packages, so they aren't guaranteed to exist when the installer runs.
Root cause
home/.chezmoitemplates/install_packages.sh.tmpl asserts the tools up front for the uv branch:
dot::assert_has_commands uv jq yq
and uses yq/jq to dedupe already-installed uv tools. Any run that has uv-based packages will fail unless yq/jq/uv already exist.
Workaround used
Moving jq and yq into install_tools (which runs at 030, before packages at 035) got the run to completion.
Danger / open question
I'm not 100% sure the simple "move them to install_tools" fix is correct — there's a possible chicken-and-egg: the tools-install step uses the same install_packages.sh.tmpl, so we need to be sure the bootstrap tools (eget, uv, and now jq/yq) can themselves be installed without depending on yq/jq being present first (i.e. the tools list must resolve purely via brew/eget, never the uv branch that triggers the assert). Worth confirming before committing.
(The local working-tree change that added jq/yq to install_tools has been reverted so this issue can drive the proper fix.)
Found during the fresh-macOS install documented in #20.
Problem
The "install packages" step fails on a fresh machine:
yq(andjq) are needed by the package installer, but they're listed as ordinarypackages, so they aren't guaranteed to exist when the installer runs.Root cause
home/.chezmoitemplates/install_packages.sh.tmplasserts the tools up front for the uv branch:and uses
yq/jqto dedupe already-installed uv tools. Any run that has uv-based packages will fail unlessyq/jq/uvalready exist.Workaround used
Moving
jqandyqintoinstall_tools(which runs at030, before packages at035) got the run to completion.Danger / open question
I'm not 100% sure the simple "move them to
install_tools" fix is correct — there's a possible chicken-and-egg: the tools-install step uses the sameinstall_packages.sh.tmpl, so we need to be sure the bootstrap tools (eget,uv, and nowjq/yq) can themselves be installed without depending onyq/jqbeing present first (i.e. the tools list must resolve purely via brew/eget, never the uv branch that triggers the assert). Worth confirming before committing.(The local working-tree change that added
jq/yqtoinstall_toolshas been reverted so this issue can drive the proper fix.)