Skip to content

Commit

Permalink
nil check .ContainerJSONBase in the podman inspect response
Browse files Browse the repository at this point in the history
  • Loading branch information
char8 committed Jul 17, 2024
1 parent 256737f commit bc7a83a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion container/podman/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (f *podmanFactory) CanHandleAndAccept(name string) (handle bool, accept boo
if err != nil {
return false, true, fmt.Errorf("error inspecting container: %v", err)
}
if ctnr.State == nil || !ctnr.State.Running {
if ctnr.ContainerJSONBase == nil || ctnr.State == nil || !ctnr.State.Running {
return false, true, fmt.Errorf("container not running")
}
return true, true, nil
Expand Down

0 comments on commit bc7a83a

Please sign in to comment.