Skip to content

Packages: Propagate installer failures instead of reporting success #40

Open

Description

@jdevera

The generated package installer can report success after a failed installation. This can also cause chezmoi to record a run_onchange script as completed, leaving the package missing until the script changes or is explicitly rerun.

In install_packages.sh.tmpl, uv tool install and custom script commands are followed by dot::step::done without checking their exit status. Neither this generated script nor the shared Bash library enables fail-fast behavior. The native package-manager branches already use explicit failure checks.

Suggested change:

  • Propagate failures consistently for uv installs, custom installers, and prerequisite repository setup.
  • Ensure failed downloads in installer pipelines cannot be hidden by a successful downstream shell.
  • Print success only after the operation succeeds.

Acceptance criteria:

  • A stubbed uv installer or custom installer returning nonzero makes the generated script exit nonzero without a success message for that step.
  • A failed download is reported as a failure.
  • A failed run remains eligible for retry on the next apply.

Found by source review; no real installer failure was induced.

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 setupbug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions