Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit af8e0af

Browse files
committed
Fix of issue #1096: Task creation errors are not displayed anymore
1 parent b0a6e1d commit af8e0af

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cmd/snapctl/task.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,17 @@ type task struct {
8787
}
8888

8989
func createTask(ctx *cli.Context) error {
90+
var err error
9091
if ctx.IsSet("task-manifest") {
9192
fmt.Println("Using task manifest to create task")
92-
createTaskUsingTaskManifest(ctx)
93+
err = createTaskUsingTaskManifest(ctx)
9394
} else if ctx.IsSet("workflow-manifest") {
9495
fmt.Println("Using workflow manifest to create task")
95-
createTaskUsingWFManifest(ctx)
96+
err = createTaskUsingWFManifest(ctx)
9697
} else {
9798
return newUsageError("Must provide either --task-manifest or --workflow-manifest arguments", ctx)
9899
}
99-
100-
return nil
100+
return err
101101
}
102102

103103
func createTaskUsingTaskManifest(ctx *cli.Context) error {

0 commit comments

Comments
 (0)