-
Notifications
You must be signed in to change notification settings - Fork 793
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
chroot: add newlines at the end of printed error messages #5753
Conversation
If we print an error message to stderr, end it with a newline. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nalind The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM |
Ephemeral COPR build failed. @containers/packit-build please check. |
/packit rebuild-failed |
/packit rebuild |
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.
LGTM.
@@ -745,7 +745,7 @@ func runUsingChrootExecMain() { | |||
logrus.Debugf("Running %#v (PATH = %q)", cmd, os.Getenv("PATH")) | |||
interrupted := make(chan os.Signal, 100) | |||
if err = cmd.Start(); err != nil { | |||
fmt.Fprintf(os.Stderr, "process failed to start with error: %v", err) | |||
fmt.Fprintf(os.Stderr, "process failed to start with error: %v\n", err) |
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.
This is ~unrelated and pre-existing — the documentation of cmd.Wait()
says
The command must have been started by Cmd.Start.
and reading the code ~confirms that .Start
must have succeeded. So, shouldn’t this exit immediately?
/lgtm |
83b5dcf
into
containers:main
What type of PR is this?
/kind other
What this PR does / why we need it:
If we print an error message to stderr, end it with a newline. This should make it easier to tell the difference between multiple error messages.
How to verify it
Manual verification only.
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
Does this PR introduce a user-facing change?