diff --git a/cmd/root.go b/cmd/root.go index 9718942..8c8d95f 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -106,10 +106,7 @@ var rootCmd = &cobra.Command{ } archivePath := "" - if util.PathIsFile(input) { - archivePath = input - - } else if util.IsValidUrl(input) { + if util.IsValidUrl(input) { fmt.Println("Downloading mrpack file from", args) file, err := requester.DefaultHttpClient.DownloadFile(input, serverDir, "") if err != nil { @@ -123,6 +120,9 @@ var rootCmd = &cobra.Command{ } }(archivePath) + } else if util.PathIsFile(input) { + archivePath = input + } else { // input is project id or slug? versions, err := modrinth.NewClient(host).GetProjectVersions(input, nil) if err != nil {