Skip to content

Commit

Permalink
fix: only attach error to diagnostics if podman machine is required (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
blva committed Mar 19, 2024
1 parent 7f98a1f commit c296a2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/podman/client.go
Expand Up @@ -181,7 +181,9 @@ func (o *client) Diagnostics(ctx context.Context) *Diagnostic {
info, err := o.machineInspect(ctx)
if err != nil {
d.MachineFound = false
d.Errors = append(d.Errors, fmt.Errorf("failed to detect podman machine: %w", err).Error())
if d.MachineRequired {
d.Errors = append(d.Errors, fmt.Sprintf("failed to detect podman machine: %s", err))
}
} else {
d.MachineInfo = info
d.MachineState = info.State
Expand Down

0 comments on commit c296a2b

Please sign in to comment.