Skip to content

Commit 4814224

Browse files
committed
Fix volume pruning to respect include protected flag in system prune
Signed-off-by: tobwen <[email protected]>
1 parent 78f01b5 commit 4814224

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/podman/system/prune.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ func prune(cmd *cobra.Command, args []string) error {
8282
return nil
8383
}
8484
}
85+
86+
// Set the include protected flag for volume pruning
87+
if pruneOptions.Volume {
88+
pruneOptions.VolumePruneOptions.IncludeProtected = includeProtected
89+
}
8590

8691
// Remove all unused pods, containers, images, networks, and volume data.
8792
pruneOptions.Filters, err = parse.FilterArgumentsIntoFilters(filters)

0 commit comments

Comments
 (0)