-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(repo): git clone
output to Stderr
#7561
Conversation
NOTE: currently unable to run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that there's no simple way to add a test at the moment. Please feel free to revert it so we can merge this fix soon.
pkg/fanal/artifact/repo/git_test.go
Outdated
func wrapNewArtifact(target string, c cache.ArtifactCache, fs *walker.FS, opts artifact.Option) (func(), []byte, error) { | ||
orig := os.Stdout | ||
r, w, _ := os.Pipe() | ||
os.Stdout = w |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overriding os.Stdout could cause a problem if this test is run in parallel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed -- reverted the test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Need some help here. Integration tests failed with this:
and it's not clear to me if I can simply restart the test. |
Yes, it's a known issue. We've raised an issue, but we haven't heard back yet. |
Head branch was pushed to by a user without write access
Description
This ensures that
git clone
output is directed toos.Stderr
instead ofos.Stdout
. Test added to demonstrate that stdout is empty after clone.Related issues
Checklist