Skip to content

--pretty should not prettify file output #1361

Closed

Description

@qweeah

What happened in your environment?

If oras manifest fetch is used with --pretty set and --output set to a file, then the output file is prettified

What did you expect to happen?

According to the help doc, --pretty should only prettify stdout output

--pretty prettify JSON objects printed to stdout

How can we reproduce it?

 oras manifest fetch -o out mcr.microsoft.com/oss/kubernetes/kubectl:v1.31.0-alpha.0 --platform linux/amd64 --pretty

The saved file out will be prettified.

What is the version of your ORAS CLI?

Version: 1.2.0-beta.1+unreleased
Go version: go1.22.1
Git commit: fa65f61
Git tree state: dirty

What is your OS environment?

Ubuntu 20.04

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.

Activity

  1. added
    bug
    triage
    on Apr 18, 2024
  2. added this to the v1.2.0-rc.1 milestone on Apr 18, 2024
  3. wangxiaoxuan273 commented on Apr 19, 2024

    @wangxiaoxuan273
    Contributor

    I'd like to work on this issue.

  4. removed
    triage
    on Apr 19, 2024
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions