| 163 | } |
| 164 | |
| 165 | func 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 | |
| 174 | func 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 { |