Skip to content

Commit 897a4ef

Browse files
committed
fix: repair go-cli
1 parent 7ff80ff commit 897a4ef

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

apps/go-cli/main.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,6 +1440,14 @@ func (c *appContext) runFileTask(options fileTaskOptions) error {
14401440
return nil
14411441
}
14421442
}
1443+
if options.wait && task.Status == deckops.TaskStatusCompleted {
1444+
var downloadResult any
1445+
if err := client.Tasks.Down(context.Background(), task.ID, deckops.TaskDownloadOptions{}, &downloadResult); err != nil {
1446+
return err
1447+
}
1448+
printJSON(downloadResult)
1449+
return nil
1450+
}
14431451
c.output(task, func() string {
14441452
lines := []string{
14451453
options.title + ":",
@@ -1462,8 +1470,8 @@ func (c *appContext) runFileTask(options fileTaskOptions) error {
14621470
func parseTaskOptions(args []string, extra optionSpec) (options, []string, error) {
14631471
spec := optionSpec{
14641472
"out": {short: "o", takesValue: true},
1465-
"wait": {value: "true"},
1466-
"no-wait": {value: "true"},
1473+
"wait": {},
1474+
"no-wait": {},
14671475
"timeout": {takesValue: true, value: strconv.Itoa(defaultTimeoutSec)},
14681476
}
14691477
for k, v := range extra {

0 commit comments

Comments
 (0)