Skip to content

Commit 7d831e3

Browse files
authored
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
1 parent df89e2c commit 7d831e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/cliui/provisionerjob.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ func ProvisionerJob(ctx context.Context, writer io.Writer, opts ProvisionerJobOp
103103
}
104104
updateStage("Running", *job.StartedAt)
105105
}
106-
updateJob()
107106

108107
if opts.Cancel != nil {
109108
// Handles ctrl+c to cancel a job.
@@ -131,6 +130,7 @@ func ProvisionerJob(ctx context.Context, writer io.Writer, opts ProvisionerJobOp
131130

132131
// The initial stage needs to print after the signal handler has been registered.
133132
printStage()
133+
updateJob()
134134

135135
logs, closer, err := opts.Logs()
136136
if err != nil {

0 commit comments

Comments
 (0)