From 20e57ac220141d7f9ae52ff2453f8cd4a7cf7cd4 Mon Sep 17 00:00:00 2001 From: comp500 Date: Tue, 28 Dec 2021 22:32:18 +0000 Subject: [PATCH] Warn when no version is provided --- modrinth/export.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modrinth/export.go b/modrinth/export.go index e22c940..339ec08 100644 --- a/modrinth/export.go +++ b/modrinth/export.go @@ -170,6 +170,10 @@ var exportCmd = &cobra.Command{ Dependencies: dependencies, } + if len(pack.Version) == 0 { + fmt.Println("Warning: pack.toml version field must not be empty to create a valid Modrinth pack") + } + w := json.NewEncoder(manifestFile) w.SetIndent("", " ") // Documentation uses 4 spaces err = w.Encode(manifest)