mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 01:45:44 +03:00
status commands handle uuid prefixes with hyphens
This commit is contained in:
@@ -231,7 +231,7 @@ func (c *NodeStatusCommand) Run(args []string) int {
|
||||
c.Ui.Error(fmt.Sprintf("Identifier must contain at least two characters."))
|
||||
return 1
|
||||
}
|
||||
if len(nodeID)%2 == 1 {
|
||||
if hyphens := strings.Count(nodeID, "-"); (len(nodeID)-hyphens)%2 == 1 {
|
||||
// Identifiers must be of even length, so we strip off the last byte
|
||||
// to provide a consistent user experience.
|
||||
nodeID = nodeID[:len(nodeID)-1]
|
||||
|
||||
Reference in New Issue
Block a user