Skip to content

Commit

Permalink
dev: Return application export error
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansmares committed Jun 12, 2023
1 parent cc17d38 commit 61e63b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/commands/export.go
Expand Up @@ -62,9 +62,9 @@ func Export(cmd *cobra.Command, args []string, f func(s source.Source, item stri
}
}

func ExportApplication() CobraRun {
return func(cmd *cobra.Command, args []string) {
Export(cmd, args, func(s source.Source, item string) error {
func ExportApplication() CobraRunE {
return func(cmd *cobra.Command, args []string) error {
return Export(cmd, args, func(s source.Source, item string) error {
return s.RangeDevices(item, export.FromContext(cmd.Context()).ExportDev)
})
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/commands/source.go
Expand Up @@ -91,7 +91,7 @@ func Application(opts ...Option) *cobra.Command {
WithUse("application ..."),
WithShort("Export all devices of an application"),
WithAliases([]string{"applications", "apps", "app", "a"}),
WithRun(ExportApplication()),
WithRunE(ExportApplication()),
}
return New(append(defaultOpts, opts...)...)
}
Expand Down

0 comments on commit 61e63b5

Please sign in to comment.