Skip to content

Commit

Permalink
chore(plugin): better error msg (#4446)
Browse files Browse the repository at this point in the history
* chore(plugin): better error msg

* lint

* Update plugin.go

Co-authored-by: Danny <[email protected]>

* Update plugin.go

---------

Co-authored-by: Danny <[email protected]>
(cherry picked from commit 709d52c)
  • Loading branch information
julienrbrt authored and mergify[bot] committed Dec 16, 2024
1 parent 54f4131 commit 94f1201
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("unable to find an App at the root of this repository (%s). Please ensure your repository URL is correct. If you're trying to install an App under a subfolder, include the path at the end of your repository URL, e.g., github.com/ignite/apps/appregistry", args[0])
}

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 94f1201

Please sign in to comment.