Skip to content

Commit ca414b0

Browse files
authored
fix: fix data race in echo provisioner (#17142)
1 parent 1360bfe commit ca414b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

provisioner/echo/serve.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response
254254
continue
255255
}
256256

257-
if len(plan.Plan) == 0 {
257+
if plan.Error == "" && len(plan.Plan) == 0 {
258258
plan.Plan = []byte("{}")
259259
}
260260
}
@@ -316,7 +316,7 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response
316316
for i, resp := range m {
317317
plan := resp.GetPlan()
318318
if plan != nil {
319-
if len(plan.Plan) == 0 {
319+
if plan.Error == "" && len(plan.Plan) == 0 {
320320
plan.Plan = []byte("{}")
321321
}
322322
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy