Skip to content

Commit

Permalink
Possibly fix Nomad capabilities issue (#5360)
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferai authored Sep 19, 2018
1 parent 8367eb6 commit 9ee8bd3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions api/sys_capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 9ee8bd3

Please sign in to comment.