From 3304f284a565bc77d8a1009d8e1770e651b95c5c Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 28 Oct 2020 10:51:32 +0900 Subject: 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 --- main.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index d73ab889..bdd733c6 100644 --- a/main.go +++ b/main.go @@ -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) } -- cgit v1.2.3