Skip to content

CLI next-step hints print the literal placeholder {bin} #30496

Open

Description

@wmadden-electric

What a user sees. In human output, next steps and error advice show {bin} instead of the binary name. Seen on rc.13 after db update, db update --dry-run, migration plan and db sign, and inside error text such as CLI.CONSENT_TOKEN_UNRESOLVED:

→ Confirm the space is up to date: {bin} migration status
→ Sign the database: {bin} db sign --db <url>
→ Name the database in `db.connection` (or pass `--db <url>`) and run `{bin} db update` again.

Where. packages/1-framework/0-foundation/utils/src/structured-error.ts documents that commands write {bin} and that the rendering surface substitutes it; packages/1-framework/1-core/errors/src/control.ts uses it in fix, nextActions and why text. The human renderer of the CLI does not substitute it in at least the next-step lines and the → advice line.

Likely fix. Substitute the binary name everywhere the CLI renders a command, fix or advice string, and add a test that fails if any rendered human output still contains {bin}.

Found by manual QA of the Mongo defaults, codecs and Prisma 6 source project against rc.13.

Activity

  1. wmadden-electric commented on Sep 30, 2026

    @wmadden-electric
    ContributorAuthor

    Update: @prisma/cli-engine 0.6.2 (#30503) now substitutes the binary name in every next action (label, reason, command), in diagnostic summaries and why text, and in summary and list blocks, in human, --json and markdown output. That fixes every example quoted above.

    What remains: {bin} inside a command's own --json result data, which the engine leaves unchanged by design. For example migration status --json still returns a summary containing "{bin} migration plan --name" (pinned in migration-status-diagnostics.e2e.test.ts). The remaining fix is to substitute the binary name in result fields that carry command text, or stop putting command text there, plus a test that fails if any rendered output still contains {bin}.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions