From 5ef335828574169bbd744f8562cc60dc8faba235 Mon Sep 17 00:00:00 2001 From: comp500 Date: Thu, 2 Dec 2021 19:53:54 +0000 Subject: [PATCH] Fix error reporting when installing Modrinth mods from URL --- modrinth/install.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modrinth/install.go b/modrinth/install.go index ee41a9e..70c33f2 100644 --- a/modrinth/install.go +++ b/modrinth/install.go @@ -81,12 +81,15 @@ var installCmd = &cobra.Command{ } else { //This wasn't a valid modid/slug, try to search for it instead: //Don't bother to search if it looks like a url though - if !strings.Contains(args[0], "modrinth.com") { + if matches == nil { err = installViaSearch(args[0], pack) if err != nil { fmt.Printf("Failed installing mod: %s\n", err) os.Exit(1) } + } else { + fmt.Printf("Failed installing mod: %s\n", err) + os.Exit(1) } } },