(cmd *cobra.Command, args []string)
| 87 | } |
| 88 | |
| 89 | func (f *debugFlags) runDebugConfigCommand(cmd *cobra.Command, args []string) (commandErr error) { |
| 90 | telemetry.TrackCommand(cmd.Context(), "debug", append([]string{"config"}, args...)) |
| 91 | defer func() { // do not inline this defer so that commandErr is not resolved early |
| 92 | telemetry.TrackCommandError(cmd.Context(), "debug", append([]string{"config"}, args...), commandErr) |
| 93 | }() |
| 94 | |
| 95 | agentSource, err := config.Resolve(args[0], f.runConfig.EnvProvider()) |
| 96 | if err != nil { |
| 97 | return err |
| 98 | } |
| 99 | |
| 100 | cfg, err := config.Load(cmd.Context(), agentSource) |
| 101 | if err != nil { |
| 102 | return err |
| 103 | } |
| 104 | |
| 105 | return yaml.NewEncoder(cmd.OutOrStdout()).Encode(cfg) |
| 106 | } |
| 107 | |
| 108 | func (f *debugFlags) runDebugToolsetsCommand(cmd *cobra.Command, args []string) (commandErr error) { |
| 109 | telemetry.TrackCommand(cmd.Context(), "debug", append([]string{"toolsets"}, args...)) |
nothing calls this directly
no test coverage detected