fix CheckVersion assuming license is set by the build script

This commit is contained in:
Patrick Pacher 2024-03-26 10:13:10 +01:00
parent ff5e461b84
commit 045eedc978

View file

@ -99,12 +99,11 @@ func CheckVersion() error {
return nil // testing on windows return nil // testing on windows
default: default:
// check version information // check version information
if name == "[NAME]" { if name == "[NAME]" || license == "[license unknown]" {
return errors.New("must call SetInfo() before calling CheckVersion()") return errors.New("must call SetInfo() before calling CheckVersion()")
} }
if version == "[version unknown]" || if version == "[version unknown]" {
license == "[license unknown]" {
return errors.New("please build using the supplied build script.\n$ ./build {main.go|...}") return errors.New("please build using the supplied build script.\n$ ./build {main.go|...}")
} }
} }