containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
22.4k stars 2.31k forks source link

pkg/machine/wsl: wrap command errors #23017

Closed Luap99 closed 2 weeks ago

Luap99 commented 2 weeks ago

First of some commands ignored cmd.Wait() error which means it was impossible to notice any command errors. And other just returned the wait error as it which is when a command fails just exit status <code> which is not helpful at all.

This commit should add proper error wrapping with stderr to get useful strings back hopefully.

Does this PR introduce a user-facing change?

None
openshift-ci[bot] commented 2 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99

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: - ~~[OWNERS](https://github.com/containers/podman/blob/main/OWNERS)~~ [Luap99] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
Luap99 commented 2 weeks ago
  C> podman.exe machine rm --force m1-742391f9cdd7
  Error: exit status 124

Looks like I didn't catch the place where the test is failing, I have to keep looking...

n1hility commented 2 weeks ago

LGTM

TomSweeneyRedHat commented 2 weeks ago

LGTM

baude commented 2 weeks ago

given this passed, im going to merge. we can clean up error messages in subsequent submissions. thanks @Luap99

baude commented 2 weeks ago

/lgtm