From 7d831e31c6235bf9bd1007a00c0f8fbda8925cb7 Mon Sep 17 00:00:00 2001 From: sonnysasaka Date: Tue, 25 Oct 2022 08:27:44 -0700 Subject: [PATCH] fix: Line gets erased due to updateJob (#4740) The first updateJob should be called after the first printStage to guarantee that only stage prints can get erased and overwritten, otherwise there could be an unrelated line that gets erased. fixes #3967 --- cli/cliui/provisionerjob.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/cliui/provisionerjob.go b/cli/cliui/provisionerjob.go index 1fb7025f2c..a7c2dcc86b 100644 --- a/cli/cliui/provisionerjob.go +++ b/cli/cliui/provisionerjob.go @@ -103,7 +103,6 @@ func ProvisionerJob(ctx context.Context, writer io.Writer, opts ProvisionerJobOp } updateStage("Running", *job.StartedAt) } - updateJob() if opts.Cancel != nil { // Handles ctrl+c to cancel a job. @@ -131,6 +130,7 @@ func ProvisionerJob(ctx context.Context, writer io.Writer, opts ProvisionerJobOp // The initial stage needs to print after the signal handler has been registered. printStage() + updateJob() logs, closer, err := opts.Logs() if err != nil {