From f061af756bef380e16d5b65344d61676349e3139 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Sun, 15 Dec 2024 10:21:00 +0100 Subject: [PATCH] chore(plugin): better error msg --- ignite/cmd/plugin.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ignite/cmd/plugin.go b/ignite/cmd/plugin.go index 7e9e80f23a..dfcb8611b8 100644 --- a/ignite/cmd/plugin.go +++ b/ignite/cmd/plugin.go @@ -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]) + } + return errors.Errorf("error while loading app %q: %w", args[0], plugins[0].Error) } session.Println(icons.OK, "Done loading apps")