Skip to content

Commit 3f30650

Browse files
committed
podman system check: Fix error check logic
Previously there is a minor logic error, which causes podman system check to do the check twice although there is no repair flag.
1 parent 27593b9 commit 3f30650

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmd/podman/system/check.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,11 @@ func check(cmd *cobra.Command, args []string) error {
6464
return err
6565
}
6666

67-
if !checkOptions.Repair && !checkOptions.RepairLossy && response.Errors {
68-
return errors.New("damage detected in local storage")
67+
if !checkOptions.Repair && !checkOptions.RepairLossy {
68+
if response.Errors {
69+
return errors.New("damage detected in local storage")
70+
}
71+
return nil
6972
}
7073

7174
recheckOptions := checkOptions

0 commit comments

Comments
 (0)