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

terminal output panics when using temp pipe file #1167

Closed
1 task done
qweeah opened this issue Nov 3, 2023 · 1 comment
Closed
1 task done

terminal output panics when using temp pipe file #1167

qweeah opened this issue Nov 3, 2023 · 1 comment
Labels
bug Something isn't working triage New issues or PRs to be acknowledged by maintainers
Milestone

Comments

@qweeah
Copy link
Contributor

qweeah commented Nov 3, 2023

What happened in your environment?

When I run below command in bash, I got unexpected panic

$ oras-main push --artifact-type my.test/example --config <(echo 123):bar/test localhost:5000/test:config foo

panic: strings: negative Repeat count

goroutine 9 [running]:
strings.Repeat({0x98e380?, 0x12?}, 0xc0002d7df8?)
        /home/azureuser/bin/go/src/strings/strings.go:554 +0x318
oras.land/oras/cmd/oras/internal/display/progress.(*status).String(0xc0000b58c0, 0x78)
        /home/azureuser/go/pkg/mod/oras.land/[email protected]/cmd/oras/internal/display/progress/status.go:128 +0x452
oras.land/oras/cmd/oras/internal/display/progress.(*manager).render(0xc000076cc0)
        /home/azureuser/go/pkg/mod/oras.land/[email protected]/cmd/oras/internal/display/progress/manager.go:100 +0xcd
oras.land/oras/cmd/oras/internal/display/progress.(*manager).start.func1()
        /home/azureuser/go/pkg/mod/oras.land/[email protected]/cmd/oras/internal/display/progress/manager.go:77 +0xf6
created by oras.land/oras/cmd/oras/internal/display/progress.(*manager).start in goroutine 1
        /home/azureuser/go/pkg/mod/oras.land/[email protected]/cmd/oras/internal/display/progress/manager.go:71 +0x7c

What did you expect to happen?

Should output proper error message rather than panic.

How can we reproduce it?

Try below command with bash

oras push --artifact-type my.test/example --config <(echo 123):bar/test localhost:5000/test:config foo

What is the version of your ORAS CLI?

Version: 1.1.0+unreleased
Go version: go1.21.0

What is your OS environment?

Ubuntu 20.04

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.
@qweeah qweeah added bug Something isn't working triage New issues or PRs to be acknowledged by maintainers labels Nov 3, 2023
@qweeah qweeah added this to the v1.2.0 milestone Nov 8, 2023
@qweeah
Copy link
Contributor Author

qweeah commented Nov 8, 2023

This issue is already fixed by #1178

@qweeah qweeah closed this as completed Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage New issues or PRs to be acknowledged by maintainers
Projects
None yet
Development

No branches or pull requests

1 participant