From cd9d425a0dcd5e96d6f3caf070256c8e07330253 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Fri, 22 Dec 2023 23:34:17 +0100 Subject: [PATCH] Fix cli lint throwing error on warnings (#2995) split out from #2771 --------- Co-authored-by: Anbraten --- cli/lint/lint.go | 4 ++-- pipeline/backend/docker/docker.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/lint/lint.go b/cli/lint/lint.go index bef3c293e..113ea0d70 100644 --- a/cli/lint/lint.go +++ b/cli/lint/lint.go @@ -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 := " " diff --git a/pipeline/backend/docker/docker.go b/pipeline/backend/docker/docker.go index bd8dd73ce..0e9c54294 100644 --- a/pipeline/backend/docker/docker.go +++ b/pipeline/backend/docker/docker.go @@ -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) } } }