Set watch option --prune=true as default

Signed-off-by: Remco Kranenburg <remco.kranenburg@crunchr.com>
This commit is contained in:
Remco Kranenburg 2025-03-19 17:27:12 +01:00 committed by Nicolas De loof
parent 342a2a9e71
commit b0badf1eb0
3 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ func watchCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
}
cmd.Flags().BoolVar(&buildOpts.quiet, "quiet", false, "hide build output")
cmd.Flags().BoolVar(&watchOpts.prune, "prune", false, "Prune dangling images on rebuild")
cmd.Flags().BoolVar(&watchOpts.prune, "prune", true, "Prune dangling images on rebuild")
cmd.Flags().BoolVar(&watchOpts.noUp, "no-up", false, "Do not build & start services before watching")
return cmd
}

View File

@ -9,7 +9,7 @@ Watch build context for service and rebuild/refresh containers when files are up
|:------------|:-------|:--------|:----------------------------------------------|
| `--dry-run` | `bool` | | Execute command in dry run mode |
| `--no-up` | `bool` | | Do not build & start services before watching |
| `--prune` | `bool` | | Prune dangling images on rebuild |
| `--prune` | `bool` | `true` | Prune dangling images on rebuild |
| `--quiet` | `bool` | | hide build output |

View File

@ -19,7 +19,7 @@ options:
swarm: false
- option: prune
value_type: bool
default_value: "false"
default_value: "true"
description: Prune dangling images on rebuild
deprecated: false
hidden: false