(cmd *cobra.Command)
| 102 | } |
| 103 | |
| 104 | func pruneOptions(cmd *cobra.Command) (types.BuilderPruneOptions, error) { |
| 105 | globalOptions, err := helpers.ProcessRootCmdFlags(cmd) |
| 106 | if err != nil { |
| 107 | return types.BuilderPruneOptions{}, err |
| 108 | } |
| 109 | |
| 110 | buildkitHost, err := GetBuildkitHost(cmd, globalOptions.Namespace) |
| 111 | if err != nil { |
| 112 | return types.BuilderPruneOptions{}, err |
| 113 | } |
| 114 | |
| 115 | all, err := cmd.Flags().GetBool("all") |
| 116 | if err != nil { |
| 117 | return types.BuilderPruneOptions{}, err |
| 118 | } |
| 119 | |
| 120 | force, err := cmd.Flags().GetBool("force") |
| 121 | if err != nil { |
| 122 | return types.BuilderPruneOptions{}, err |
| 123 | } |
| 124 | |
| 125 | return types.BuilderPruneOptions{ |
| 126 | Stderr: cmd.OutOrStderr(), |
| 127 | GOptions: globalOptions, |
| 128 | BuildKitHost: buildkitHost, |
| 129 | All: all, |
| 130 | Force: force, |
| 131 | }, nil |
| 132 | } |
| 133 | |
| 134 | func debugCommand() *cobra.Command { |
| 135 | shortHelp := `Debug Dockerfile` |
no test coverage detected
searching dependent graphs…