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

chroot: add newlines at the end of printed error messages #5753

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

nalind
Copy link
Member

@nalind nalind commented Sep 24, 2024

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?

None

If we print an error message to stderr, end it with a newline.

Signed-off-by: Nalin Dahyabhai <[email protected]>
@nalind nalind added the No New Tests Allow PR to proceed without adding regression tests label Sep 24, 2024
Copy link
Contributor

openshift-ci bot commented Sep 24, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhatdan
Copy link
Member

rhatdan commented Sep 24, 2024

LGTM

Copy link

Ephemeral COPR build failed. @containers/packit-build please check.

@nalind
Copy link
Member Author

nalind commented Sep 25, 2024

/packit rebuild-failed

@nalind
Copy link
Member Author

nalind commented Sep 26, 2024

/packit rebuild

Copy link
Contributor

@mtrmac mtrmac left a 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)
Copy link
Contributor

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?

@rhatdan
Copy link
Member

rhatdan commented Oct 23, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Oct 23, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 83b5dcf into containers:main Oct 23, 2024
22 of 32 checks passed
@nalind nalind deleted the newline-error branch October 23, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved kind/other lgtm No New Tests Allow PR to proceed without adding regression tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants