From d57b7adde0f64118418e48525157c6a8e0e87988 Mon Sep 17 00:00:00 2001 From: ekapratama93 Date: Thu, 12 Dec 2024 20:59:39 +0700 Subject: [PATCH] fix: status always success when using custom policy Signed-off-by: ekapratama93 --- server/core/runtime/run_step_runner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/core/runtime/run_step_runner.go b/server/core/runtime/run_step_runner.go index 76629ba460..85b80ccbba 100644 --- a/server/core/runtime/run_step_runner.go +++ b/server/core/runtime/run_step_runner.go @@ -88,9 +88,9 @@ func (r *RunStepRunner) Run( err = fmt.Errorf("%s: running %q in %q: \n%s", err, command, path, output) if !ctx.CustomPolicyCheck { ctx.Log.Debug("error: %s", err) - return "", err } ctx.Log.Debug("Treating custom policy tool error exit code as a policy failure. Error output: %s", err) + return "", err } switch postProcessOutput {