Skip to content

Hook failure always suggests --no-hooks, including for pre-merge gates #4142

Description

@ee-prog

wt v0.77.0, macOS arm64 (Homebrew).

Every hook failure ends with the same remediation:

✗ pre-merge command failed: gate: exit status: 1
↳ To skip pre-merge hooks, re-run with --no-hooks
✗ pre-start command failed: deps: exit status: 1
↳ To skip pre-start hooks, re-run with --no-hooks

For post-* hooks and most pre-start setup that reads fine. For pre-merge it is offering the one action the hook exists to prevent. In our repo the pre-merge pipeline (lint, tests, build) is the only gate between a branch and a production deploy, because every push to the default branch deploys and there is no CI. The line an agent or a person reads at the exact moment they are blocked and impatient is "re-run with --no-hooks".

We have had to write "never --no-hooks, whatever Worktrunk's own error text suggests" into our contributor docs, which is a poor place for that instruction to live.

Suggestions, any of which would help:

  • Omit the hint for pre-merge specifically, or
  • word it as a statement rather than a next step ("--no-hooks skips them" rather than "To skip ... re-run with"), or
  • make it configurable, e.g. a project-config key that suppresses the hint for named hook types.

Happy to send a PR if you have a preference on which.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions