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