Skip to content

Commit

Permalink
fixed error display
Browse files Browse the repository at this point in the history
  • Loading branch information
RayanMarmar committed May 14, 2024
1 parent 5c2c931 commit f6906c0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions cmd/model/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func init() {
func runAdd(cmd *cobra.Command, args []string) {
err := addController.Run(args, customArgs)
if err != nil {
app.UI().Error().Println(err.Error())
os.Exit(1)
}
}
1 change: 0 additions & 1 deletion internal/controller/model/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func (ac AddController) Run(args []string, customArgs downloadermodel.Args) erro
var result resultutil.ExecutionResult
warnings, err := ac.processAdd(selectedModel, customArgs)
result.AddWarnings(warnings)
result.SetError(err)
result.Display("Operation succeeded", "Operation failed")

return err
Expand Down

0 comments on commit f6906c0

Please sign in to comment.