Skip to content

Commit

Permalink
chore(plugin): better error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Dec 15, 2024
1 parent 1370b00 commit f061af7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ignite/cmd/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,11 @@ Respects key value pairs declared after the app path to be added to the generate
}
defer plugins[0].KillClient()

if plugins[0].Error != nil {
if err := plugins[0].Error; err != nil {
if strings.Contains(err.Error(), "go.mod file not found in current directory") {
return errors.Errorf("We can not find an app at the root of this repository (%s), please make sure your repository url is correct. If you're trying to install an app under a sub folder don't forget to add the path at the end of your repository url. E.g. github.com/ignite/apps/appregistry.", args[0])

Check failure on line 517 in ignite/cmd/plugin.go

View workflow job for this annotation

GitHub Actions / Lint Go code

error-strings: error strings should not be capitalized or end with punctuation or a newline (revive)
}

return errors.Errorf("error while loading app %q: %w", args[0], plugins[0].Error)
}
session.Println(icons.OK, "Done loading apps")
Expand Down

0 comments on commit f061af7

Please sign in to comment.