fix: use -no-color when calling terraform show state (#4812)

This commit is contained in:
Colin Adler
2022-10-31 13:03:59 -05:00
committed by GitHub
parent cffb723ecc
commit 1bd67b8064
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -342,7 +342,7 @@ func (e executor) stateResources(ctx, killCtx context.Context) ([]*proto.Resourc
}
func (e executor) state(ctx, killCtx context.Context) (*tfjson.State, error) {
args := []string{"show", "-json"}
args := []string{"show", "-json", "-no-color"}
state := &tfjson.State{}
err := e.execParseJSON(ctx, killCtx, args, e.basicEnv(), state)
if err != nil {
+3 -3
View File
@@ -233,6 +233,9 @@ func (r *Runner) ForceStop() {
}
func (r *Runner) update(ctx context.Context, u *proto.UpdateJobRequest) (*proto.UpdateJobResponse, error) {
ctx, span := r.startTrace(ctx, tracing.FuncName())
defer span.End()
r.mutex.Lock()
defer r.mutex.Unlock()
if !r.okToSend {
@@ -248,9 +251,6 @@ func (r *Runner) doCleanFinish(ctx context.Context) {
completedJob *proto.CompletedJob
)
ctx, span := r.startTrace(ctx, tracing.FuncName())
defer span.End()
// push the fail/succeed write onto the defer stack before the cleanup, so
// that cleanup happens before this.
defer func() {