Fix cli lint throwing error on warnings (#2995)

split out from  #2771

---------

Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
6543 2023-12-22 23:34:17 +01:00 committed by GitHub
parent f6ca346f13
commit cd9d425a0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -101,9 +101,9 @@ func lintFile(_ *cli.Context, file string) error {
// TODO: lint multiple files at once to allow checks for sth like "depends_on" to work
err = linter.New(linter.WithTrusted(true)).Lint([]*linter.WorkflowConfig{config})
if err != nil {
fmt.Printf("🔥 %s has errors:\n", output.String(config.File).Underline())
fmt.Printf("🔥 %s has warning / errors:\n", output.String(config.File).Underline())
hasErrors := true
hasErrors := false
for _, err := range pipeline_errors.GetPipelineErrors(err) {
line := " "

View file

@ -318,10 +318,10 @@ func (e *docker) DestroyWorkflow(_ context.Context, conf *backend.Config, taskUU
for _, step := range stage.Steps {
containerName := toContainerName(step)
if err := e.client.ContainerKill(noContext, containerName, "9"); err != nil && !isErrContainerNotFoundOrNotRunning(err) {
log.Error().Err(err).Msgf("could not kill container '%s'", stage.Name)
log.Error().Err(err).Msgf("could not kill container '%s'", step.Name)
}
if err := e.client.ContainerRemove(noContext, containerName, removeOpts); err != nil && !isErrContainerNotFoundOrNotRunning(err) {
log.Error().Err(err).Msgf("could not remove container '%s'", stage.Name)
log.Error().Err(err).Msgf("could not remove container '%s'", step.Name)
}
}
}