Possibly fix Nomad capabilities issue (#5360)
This commit is contained in:
parent
8367eb6619
commit
9ee8bd3438
@ -50,5 +50,15 @@ func (c *Sys) Capabilities(token, path string) ([]string, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(res) == 0 {
|
||||
_, ok := secret.Data["capabilities"]
|
||||
if ok {
|
||||
err = mapstructure.Decode(secret.Data["capabilities"], &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return res, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user