public function locate($command, $forceUnix = false)
{
// Search executable:
$executable = $this->executableFinder->find($command, null, [$this->binDir]);
if (!$executable) {
throw new RuntimeException(sprintf('The executable for "%s" could not be found.', $command));
}
// Make sure to add unix-style directory separators if unix-mode is enforced
if ($forceUnix) {
$parts = pathinfo($executable);
$executable = $parts['dirname'] . '/' . $parts['filename'];
}
return $executable;
}