Skip to content

Package install requires yq/jq/uv but they're installed as regular packages (bootstrap ordering) #24

Description

@jdevera

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.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bootstrapFresh-machine bootstrap / first-run setup

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions