mirror of
https://github.com/safing/portbase
synced 2025-09-01 18:19:57 +00:00
fix CheckVersion assuming license is set by the build script
This commit is contained in:
parent
ff5e461b84
commit
045eedc978
1 changed files with 2 additions and 3 deletions
|
@ -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|...}")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue