Skip to content

Commit 1bd67b8

Browse files
authored
fix: use -no-color when calling terraform show state (#4812)
1 parent cffb723 commit 1bd67b8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

provisioner/terraform/executor.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ func (e executor) stateResources(ctx, killCtx context.Context) ([]*proto.Resourc
342342
}
343343

344344
func (e executor) state(ctx, killCtx context.Context) (*tfjson.State, error) {
345-
args := []string{"show", "-json"}
345+
args := []string{"show", "-json", "-no-color"}
346346
state := &tfjson.State{}
347347
err := e.execParseJSON(ctx, killCtx, args, e.basicEnv(), state)
348348
if err != nil {

provisionerd/runner/runner.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ func (r *Runner) ForceStop() {
233233
}
234234

235235
func (r *Runner) update(ctx context.Context, u *proto.UpdateJobRequest) (*proto.UpdateJobResponse, error) {
236+
ctx, span := r.startTrace(ctx, tracing.FuncName())
237+
defer span.End()
238+
236239
r.mutex.Lock()
237240
defer r.mutex.Unlock()
238241
if !r.okToSend {
@@ -248,9 +251,6 @@ func (r *Runner) doCleanFinish(ctx context.Context) {
248251
completedJob *proto.CompletedJob
249252
)
250253

251-
ctx, span := r.startTrace(ctx, tracing.FuncName())
252-
defer span.End()
253-
254254
// push the fail/succeed write onto the defer stack before the cleanup, so
255255
// that cleanup happens before this.
256256
defer func() {

0 commit comments

Comments
 (0)