Skip to content

Commit

Permalink
fix CheckVersion assuming license is set by the build script
Browse files Browse the repository at this point in the history
  • Loading branch information
ppacher committed Mar 26, 2024
1 parent ff5e461 commit 045eedc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions info/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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|...}")
}
}
Expand Down

0 comments on commit 045eedc

Please sign in to comment.