Don't expect `chcon` on a Mac
Test was incorrectly inverted
@@ -1108,7 +1108,7 @@ func SetupHostPathVolumes(c kcoreclient.PersistentVolumeInterface, prefix, capac
if err != nil {
return volumes, err
}
- if _, err = exec.LookPath("chcon"); err != nil {
+ if _, err = exec.LookPath("chcon"); err == nil {
err := exec.Command("chcon", "-t", "svirt_sandbox_file_t", dir).Run()
if err != nil {
return volumes, err
