there used to be some problem with which... can't remember it atm. I suggest something like 

```
bash -c 'type -p #{binary}' >/dev/null
```

instead..