mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
client: fix Consul version finterprint (#17349)
Consul v1.13.8 was released with a breaking change in the /v1/agent/self endpoint version where a line break was being returned. This caused the Nomad finterprint to fail because `NewVersion` errors on parse. This commit removes any extra space from the Consul version returned by the API.
This commit is contained in:
@@ -20,7 +20,7 @@ func SKU(info Self) (string, bool) {
|
||||
return "", ok
|
||||
}
|
||||
|
||||
ver, vErr := version.NewVersion(v)
|
||||
ver, vErr := version.NewVersion(strings.TrimSpace(v))
|
||||
if vErr != nil {
|
||||
return "", false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user