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.

Signed-off-by: Sonny Sasaka <sonnysasaka@gmail.com>
This commit is contained in:
Sonny Sasaka
2025-05-31 16:44:52 -07:00
parent 27593b9e33
commit c87a761e05

View File

@ -64,8 +64,11 @@ func check(cmd *cobra.Command, args []string) error {
return err
}
if !checkOptions.Repair && !checkOptions.RepairLossy && response.Errors {
return errors.New("damage detected in local storage")
if !checkOptions.Repair && !checkOptions.RepairLossy {
if response.Errors {
return errors.New("damage detected in local storage")
}
return nil
}
recheckOptions := checkOptions