Panic when fzf was built without version information

So that the package maintainers would immediately know that the build is
incorrect. But is there a way to make build simply fail?

Related: https://github.com/junegunn/fzf.vim/issues/1150
This commit is contained in:
Junegunn Choi
2020-10-28 10:51:32 +09:00
parent 0d5f862daf
commit 3304f284a5
2 changed files with 7 additions and 13 deletions

View File

@@ -9,6 +9,9 @@ var version string
var revision string
func main() {
if len(version) == 0 {
panic("Invalid build: version information missing")
}
protector.Protect()
fzf.Run(fzf.ParseOptions(), version, revision)
}