From 045eedc978c931dd6712f73130c213441ec36f57 Mon Sep 17 00:00:00 2001 From: Patrick Pacher Date: Tue, 26 Mar 2024 10:13:10 +0100 Subject: [PATCH] fix CheckVersion assuming license is set by the build script --- info/version.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/info/version.go b/info/version.go index 129f3a9..6d4e99a 100644 --- a/info/version.go +++ b/info/version.go @@ -99,12 +99,11 @@ func CheckVersion() error { return nil // testing on windows default: // check version information - if name == "[NAME]" { + if name == "[NAME]" || license == "[license unknown]" { return errors.New("must call SetInfo() before calling CheckVersion()") } - if version == "[version unknown]" || - license == "[license unknown]" { + if version == "[version unknown]" { return errors.New("please build using the supplied build script.\n$ ./build {main.go|...}") } }