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

fix: make --output - implies --no-tty #1286

Merged
merged 7 commits into from
Mar 15, 2024
Merged

Conversation

wangxiaoxuan273
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1268

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.99%. Comparing base (9dbac04) to head (d63ec03).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1286      +/-   ##
==========================================
+ Coverage   81.95%   81.99%   +0.04%     
==========================================
  Files          83       83              
  Lines        3996     4005       +9     
==========================================
+ Hits         3275     3284       +9     
  Misses        498      498              
  Partials      223      223              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wangxiaoxuan273
Copy link
Contributor Author

wangxiaoxuan273 commented Mar 13, 2024

As per comment in the issue, now --output - implies --no-tty in oras blob fetch, but we also allow users to explicitly put --no-tty=false with --output -.

Current display:
Screenshot 2024-03-13 at 19 00 22

Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor suggestion: suggest to align unit test description with real e2e use case.

cmd/oras/internal/option/common_test.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/common_test.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/common_test.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/common_test.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/common_test.go Outdated Show resolved Hide resolved
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
@qweeah qweeah merged commit ec23755 into oras-project:main Mar 15, 2024
8 checks passed
@wangxiaoxuan273 wangxiaoxuan273 deleted the tty branch March 18, 2024 05:51
FeynmanZhou pushed a commit to FeynmanZhou/oras that referenced this pull request May 11, 2024
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

oras blob fetch failed to output to stdout in TTY mode
3 participants