From 8db5d630d5145635acf257c8ccfb1f7726e93cdd Mon Sep 17 00:00:00 2001 From: James Shubin Date: Fri, 15 Jan 2016 16:49:50 -0500 Subject: [PATCH] Exit if program was not compiled correctly Catch the missing injection of program name. --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 918afab9..6faf34b0 100644 --- a/main.go +++ b/main.go @@ -211,6 +211,9 @@ func main() { log.SetFlags(log.LstdFlags | log.Lshortfile) //} log.SetFlags(log.Flags() - log.Ldate) // remove the date for now + if program == "" || version == "" { + log.Fatal("Program was not compiled correctly. Please see Makefile.") + } app := cli.NewApp() app.Name = program app.Usage = "next generation config management"