Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(plugin): better error msg (backport #4446) #4447

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading