Skip to content

manifest fetch: incorrect format in --output - error message #2202

Closed

Description

@TanvirTian

What happened in your environment?

When using oras manifest fetch with --output - and a non-text --format, the error message displays the --template value instead of the --format`value

For example:

oras manifest fetch localhost:5000/hello:v1 \
  --output - \
  --format go-template \
  --template '{{.digest}}'

output:

Error: --output - cannot be used with --format {{.digest}} at the same time

Expected:

Error: --output - cannot be used with `--format go-template` at the same time

The error occurs during argument validation, before contacting the registry.

What did you expect to happen?

The error message should display the value supplied to --format

For the example above:

Error: --output - cannot be used with `--format go-template` at the same time

The validation behavior itself is correct; only the value displayed in the error message is incorrect.

How can we reproduce it?

  1. Run:
oras manifest fetch localhost:5000/hello:v1 \
  --output - \
  --format go-template \
  --template '{{.digest}}'
  1. Observe the error:
Error: `--output -` cannot be used with `--format {{.digest}}` at the same time

The --format value is go-template, but the error displays the --template value {{.digest}}

The issue can also be reproduced without --template:

oras manifest fetch localhost:5000/hello:v1 \
  --output - \
  --format json

which reports an empty format value

What is the version of your ORAS CLI?

Version: 1.3.4

What is your OS environment?

CachyOS Linux (x86_64)

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.

Activity

  1. added
    bug
    triage
    on Sep 30, 2026
  2. TerryHowe commented on Sep 30, 2026

    @TerryHowe
    Member

    Fixed

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

    bugtriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions