Skip to content

Commit 61e63b5

Browse files
committed
dev: Return application export error
1 parent cc17d38 commit 61e63b5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/commands/export.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ func Export(cmd *cobra.Command, args []string, f func(s source.Source, item stri
6262
}
6363
}
6464

65-
func ExportApplication() CobraRun {
66-
return func(cmd *cobra.Command, args []string) {
67-
Export(cmd, args, func(s source.Source, item string) error {
65+
func ExportApplication() CobraRunE {
66+
return func(cmd *cobra.Command, args []string) error {
67+
return Export(cmd, args, func(s source.Source, item string) error {
6868
return s.RangeDevices(item, export.FromContext(cmd.Context()).ExportDev)
6969
})
7070
}

pkg/commands/source.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func Application(opts ...Option) *cobra.Command {
9191
WithUse("application ..."),
9292
WithShort("Export all devices of an application"),
9393
WithAliases([]string{"applications", "apps", "app", "a"}),
94-
WithRun(ExportApplication()),
94+
WithRunE(ExportApplication()),
9595
}
9696
return New(append(defaultOpts, opts...)...)
9797
}

0 commit comments

Comments
 (0)