()
| 15 | } |
| 16 | |
| 17 | func removeCmd() *cobra.Command { |
| 18 | flags := removeCmdFlags{} |
| 19 | command := &cobra.Command{ |
| 20 | Use: "rm <pkg>...", |
| 21 | Short: "Remove a package from your devbox", |
| 22 | Args: cobra.MinimumNArgs(1), |
| 23 | PreRunE: ensureNixInstalled, |
| 24 | RunE: func(cmd *cobra.Command, args []string) error { |
| 25 | return runRemoveCmd(cmd, args, flags) |
| 26 | }, |
| 27 | } |
| 28 | |
| 29 | flags.config.register(command) |
| 30 | return command |
| 31 | } |
| 32 | |
| 33 | func runRemoveCmd(cmd *cobra.Command, args []string, flags removeCmdFlags) error { |
| 34 | box, err := devbox.Open(&devopt.Opts{ |
no test coverage detected