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
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|...}")
}
}