MCPcopy Index your code
hub / github.com/devspace-sh/devspace / findCommand

Function findCommand

cmd/run.go:165–172  ·  view source on GitHub ↗
(config config.Config, name string)

Source from the content-addressed store, hash-verified

163}
164
165func findCommand(config config.Config, name string) (*latest.CommandConfig, error) {
166 // Find command
167 if config.Config().Commands == nil || config.Config().Commands[name] == nil {
168 return nil, errors.Errorf("couldn't find command '%s' in devspace config", name)
169 }
170
171 return config.Config().Commands[name], nil
172}
173
174func executeCommandWithAfter(ctx context.Context, command *latest.CommandConfig, args []string, variables map[string]interface{}, dir string, stdout io.Writer, stderr io.Writer, stdin io.Reader, log log.Logger) error {
175 originalErr := interrupt.Global.Run(func() error {

Callers 1

RunRunMethod · 0.85

Calls 2

ConfigInterface · 0.92
ErrorfMethod · 0.45

Tested by

no test coverage detected