Skip to content

Commit 9b19b5f

Browse files
authored
Always log changeset spec ids in JSON UI (#642)
1 parent 828728b commit 9b19b5f

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

cmd/src/batch_exec.go

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -189,20 +189,16 @@ func executeBatchSpecInWorkspaces(ctx context.Context, opts executeBatchSpecOpts
189189

190190
ids := make([]graphql.ChangesetSpecID, len(specs))
191191

192-
if len(specs) > 0 {
193-
opts.ui.UploadingChangesetSpecs(len(specs))
194-
195-
for i, spec := range specs {
196-
id, err := svc.CreateChangesetSpec(ctx, spec)
197-
if err != nil {
198-
return err
199-
}
200-
ids[i] = id
201-
opts.ui.UploadingChangesetSpecsProgress(i+1, len(specs))
192+
opts.ui.UploadingChangesetSpecs(len(specs))
193+
for i, spec := range specs {
194+
id, err := svc.CreateChangesetSpec(ctx, spec)
195+
if err != nil {
196+
return err
202197
}
203-
204-
opts.ui.UploadingChangesetSpecsSuccess(ids)
198+
ids[i] = id
199+
opts.ui.UploadingChangesetSpecsProgress(i+1, len(specs))
205200
}
201+
opts.ui.UploadingChangesetSpecsSuccess(ids)
206202

207203
return nil
208204
}

0 commit comments

Comments
 (0)