From 08aa037dd3ace68f48c303270847c59a2c8d5cef Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Thu, 31 Mar 2016 15:10:19 -0700 Subject: [PATCH] Guard against a node name containing pure whitespace for real --- command/agent/command.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/agent/command.go b/command/agent/command.go index dfd24ef57..c11b90c5c 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -169,8 +169,8 @@ func (c *Command) readConfig() *Config { } config.NodeName = hostname } - hostname = strings.TrimSpace(hostname) - if hostname == "" { + config.NodeName = strings.TrimSpace(config.NodeName) + if config.NodeName == "" { c.Ui.Error("Node name can not be empty") return nil }