mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: use -no-color when calling terraform show state (#4812)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user