MCPcopy Index your code
hub / github.com/docker/docker-agent / runDebugConfigCommand

Method runDebugConfigCommand

cmd/root/debug.go:89–106  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

87}
88
89func (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
108func (f *debugFlags) runDebugToolsetsCommand(cmd *cobra.Command, args []string) (commandErr error) {
109 telemetry.TrackCommand(cmd.Context(), "debug", append([]string{"toolsets"}, args...))

Callers

nothing calls this directly

Calls 6

TrackCommandFunction · 0.92
TrackCommandErrorFunction · 0.92
ResolveFunction · 0.92
LoadFunction · 0.92
ContextMethod · 0.80
EnvProviderMethod · 0.80

Tested by

no test coverage detected