File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,11 @@ import (
2121 "io"
2222
2323 emoji "github.com/Andrew-M-C/go.emoji"
24- "github.com/arduino/arduino-app-cli/internal/orchestrator/bricksindex"
2524 "github.com/arduino/go-paths-helper"
2625 "github.com/goccy/go-yaml"
2726 "github.com/goccy/go-yaml/ast"
27+
28+ "github.com/arduino/arduino-app-cli/internal/orchestrator/bricksindex"
2829)
2930
3031type Brick struct {
Original file line number Diff line number Diff line change @@ -122,9 +122,13 @@ func StartApp(
122122 ctx , cancel := context .WithCancel (ctx )
123123 defer cancel ()
124124
125- err := app .Descriptor .ValidateBricks (bricksIndex )
126- if err != nil {
127- yield (StreamMessage {error : err })
125+ errs := app .Descriptor .ValidateBricks (bricksIndex )
126+ if errs != nil {
127+ for _ , e := range errs {
128+ if ! yield (StreamMessage {error : e }) {
129+ return
130+ }
131+ }
128132 return
129133 }
130134
@@ -453,9 +457,13 @@ func RestartApp(
453457 ctx , cancel := context .WithCancel (ctx )
454458 defer cancel ()
455459
456- err := appToStart .Descriptor .ValidateBricks (bricksIndex )
457- if err != nil {
458- yield (StreamMessage {error : err })
460+ errs := appToStart .Descriptor .ValidateBricks (bricksIndex )
461+ if errs != nil {
462+ for _ , e := range errs {
463+ if ! yield (StreamMessage {error : e }) {
464+ return
465+ }
466+ }
459467 return
460468 }
461469
You can’t perform that action at this time.
0 commit comments