From 1ea6b9004f46fa508191c631e685a3587beb293d Mon Sep 17 00:00:00 2001 From: Gabriel Rat Date: Wed, 5 Apr 2023 16:51:53 +0300 Subject: [PATCH] Fixed reason string format --- step_check_cancellation.go | 2 +- step_run_script.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/step_check_cancellation.go b/step_check_cancellation.go index b153afbd8..4ed86dea1 100644 --- a/step_check_cancellation.go +++ b/step_check_cancellation.go @@ -28,7 +28,7 @@ func (s *stepCheckCancellation) Run(state multistep.StateBag) multistep.StepActi buildJob := state.Get("buildJob").(Job) if _, ok := state.GetOk("logWriter"); ok { logWriter := state.Get("logWriter").(LogWriter) - s.writeLogAndFinishWithState(ctx, logWriter, buildJob, FinishStateCancelled, fmt.Sprintf("\n\nDone: Job Cancelled\n\n%s", command.Reason)) + s.writeLogAndFinishWithState(ctx, logWriter, buildJob, FinishStateCancelled, fmt.Sprintf("\n\nDone: Job Cancelled\n%s\n", command.Reason)) } else { err := buildJob.Finish(ctx, FinishStateCancelled) if err != nil { diff --git a/step_run_script.go b/step_run_script.go index 640c5dbc0..925bf16ff 100644 --- a/step_run_script.go +++ b/step_run_script.go @@ -142,7 +142,7 @@ func (s *stepRunScript) Run(state multistep.StateBag) multistep.StepAction { Message: JobCancelledError.Error(), }) - s.writeLogAndFinishWithState(preTimeoutCtx, ctx, logWriter, buildJob, FinishStateCancelled, fmt.Sprintf("\n\nDone: Job Cancelled\n\n%s", cancelCommand.Reason)) + s.writeLogAndFinishWithState(preTimeoutCtx, ctx, logWriter, buildJob, FinishStateCancelled, fmt.Sprintf("\n\nDone: Job Cancelled\n%s\n", cancelCommand.Reason)) return multistep.ActionHalt case <-logWriter.Timeout():