Skip to content

Commit

Permalink
Add --force flag to images prune
Browse files Browse the repository at this point in the history
Add a -f, --force flag to images prune. As there was previously no
prompt to force prune images, this commit does nothing to add such a
question, only make the cli command compatible with docker cli.

Resolves containers#4410

Signed-off-by: Tyler Ramer <[email protected]>
  • Loading branch information
tylarb committed Nov 15, 2019
1 parent de32b89 commit ad7e6a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/podman/cliconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ type HistoryValues struct {
}
type PruneImagesValues struct {
PodmanCommand
All bool
All bool
Force bool
}

type PruneContainersValues struct {
Expand Down
1 change: 1 addition & 0 deletions cmd/podman/images_prune.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func init() {
pruneImagesCommand.SetUsageTemplate(UsageTemplate())
flags := pruneImagesCommand.Flags()
flags.BoolVarP(&pruneImagesCommand.All, "all", "a", false, "Remove all unused images, not just dangling ones")
flags.BoolVarP(&pruneImagesCommand.Force, "force", "f", false, "Do not prompt for confirmation on pruning images")
}

func pruneImagesCmd(c *cliconfig.PruneImagesValues) error {
Expand Down

0 comments on commit ad7e6a0

Please sign in to comment.