(cmd *cobra.Command, args []string, flags *initFlags)
| 60 | } |
| 61 | |
| 62 | func runInitCmd(cmd *cobra.Command, args []string, flags *initFlags) error { |
| 63 | path := pathArg(args) |
| 64 | |
| 65 | if flags.auto { |
| 66 | if flags.dryRun { |
| 67 | config, err := autodetect.DryRun(cmd.Context(), path) |
| 68 | if err != nil { |
| 69 | return errors.WithStack(err) |
| 70 | } |
| 71 | fmt.Fprintln(cmd.OutOrStdout(), string(config)) |
| 72 | return nil |
| 73 | } |
| 74 | return autodetect.InitConfig(cmd.Context(), path) |
| 75 | } |
| 76 | |
| 77 | return devbox.InitConfig(path) |
| 78 | } |
no test coverage detected