Handles the case where no version information is available

This commit is contained in:
sloum 2020-11-05 19:33:54 -08:00
parent ed084298c7
commit 1ae3312ad6
1 changed files with 5 additions and 1 deletions

View File

@ -346,7 +346,11 @@ func (c *client) simpleCommand(action string) {
case "HELP", "?":
c.Visit(helplocation)
case "VERSION":
c.SetMessage("Bombadillo version: " + version, false)
ver := version
if ver == "" {
ver = "Improperly compiled, no version information"
}
c.SetMessage("Bombadillo version: " + ver, false)
c.DrawMessage()
default:
c.SetMessage(syntaxErrorMessage(action), true)