diff --git a/drivers/shared/capabilities/defaults.go b/drivers/shared/capabilities/defaults.go index 4c7c2c59898..b86d7aacf98 100644 --- a/drivers/shared/capabilities/defaults.go +++ b/drivers/shared/capabilities/defaults.go @@ -41,11 +41,14 @@ func NomadDefaults() *Set { func Supported() *Set { s := New(nil) - list, _ := capability.ListSupported() - - // capability.ListSupported() will always return an empty list on non-linux - // systems - if runtime.GOOS != "linux" { + var list []capability.Cap + + switch runtime.GOOS { + case "linux": + list, _ = capability.ListSupported() + default: + // capability.ListSupported() will always return an empty list on + // non-linux systems list = capability.ListKnown() }