mirror of
https://github.com/coder/coder.git
synced 2026-09-21 20:51:01 +08:00
fix: fix data race in echo provisioner (#17142)
This commit is contained in:
@@ -254,7 +254,7 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response
|
||||
continue
|
||||
}
|
||||
|
||||
if len(plan.Plan) == 0 {
|
||||
if plan.Error == "" && len(plan.Plan) == 0 {
|
||||
plan.Plan = []byte("{}")
|
||||
}
|
||||
}
|
||||
@@ -316,7 +316,7 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response
|
||||
for i, resp := range m {
|
||||
plan := resp.GetPlan()
|
||||
if plan != nil {
|
||||
if len(plan.Plan) == 0 {
|
||||
if plan.Error == "" && len(plan.Plan) == 0 {
|
||||
plan.Plan = []byte("{}")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user