()
| 19 | } |
| 20 | |
| 21 | func infoCmd() *cobra.Command { |
| 22 | flags := infoCmdFlags{} |
| 23 | command := &cobra.Command{ |
| 24 | Use: "info <pkg>", |
| 25 | Short: "Display package info", |
| 26 | Args: cobra.ExactArgs(1), |
| 27 | PreRunE: ensureNixInstalled, |
| 28 | RunE: func(cmd *cobra.Command, args []string) error { |
| 29 | return infoCmdFunc(cmd, args[0], flags) |
| 30 | }, |
| 31 | } |
| 32 | |
| 33 | flags.config.register(command) |
| 34 | command.Flags().BoolVar(&flags.markdown, "markdown", false, "output in markdown format") |
| 35 | return command |
| 36 | } |
| 37 | |
| 38 | func infoCmdFunc(cmd *cobra.Command, pkg string, flags infoCmdFlags) error { |
| 39 | box, err := devbox.Open(&devopt.Opts{ |
no test coverage detected