mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user