Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance manifet fetch #531

Closed
qweeah opened this issue Sep 2, 2022 · 5 comments · Fixed by #541
Closed

Enhance manifet fetch #531

qweeah opened this issue Sep 2, 2022 · 5 comments · Fixed by #541
Assignees
Milestone

Comments

@qweeah
Copy link
Contributor

qweeah commented Sep 2, 2022

  1. Refactor the implementation with oras.Fetch and oras.FetchBytes in oras-go
  2. Add below UX
# Fetch
# add output flag
oras manifest fetch <name> --pretty > <path>                     # manifest prettified to file via stdout
oras manifest fetch <name> --output <path> --pretty              # manifest raw to file
oras manifest fetch <name> --output - --pretty > <path>          # manifest prettified to file
oras manifest fetch <name> --output <path> --pretty --descriptor # descriptor prettified
# --output - cannot be used with --descriptor at the same time
@shizhMSFT shizhMSFT added this to the v0.15.0 milestone Sep 5, 2022
@shizhMSFT
Copy link
Contributor

@yuehaoliang-microsoft Could you help this issue?

@yuehaoliang
Copy link
Contributor

I'll leverage new methods in oras-go to improve oras manifest fetch, and support new flags.

@yuehaoliang
Copy link
Contributor

yuehaoliang commented Sep 7, 2022

@shizhMSFT Should oras manifest fetch <name> --output <path> --pretty save a prettified content to the file? If not, --pretty is meaningless when used with oras manifest fetch <name> --output <path>, and then should it through an error in this case?
@lizMSFT I think it also applies to blob fetch.

@shizhMSFT
Copy link
Contributor

shizhMSFT commented Sep 7, 2022

Should oras manifest fetch --output --pretty save a prettified content to the file?

No. --pretty should only work on stdout. If --pretty is specified with --output, the --pretty option is ignored.

@yuehaoliang
Copy link
Contributor

Should oras manifest fetch --output --pretty save a prettified content to the file?

No. --pretty should only work on stdout. If --pretty is specified with --output, the --pretty option is ignored.

Thank you for clarifying. I see, --pretty should be just ignored when used with oras manifest fetch <name> --output <path>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants