Skip to content
Permalink
Browse files

change command to which available under most unix systems

agree i will change it which is available under suse, ubuntu, debian, fedora, bsd
  • Loading branch information...
gimler authored and ASA1-ET-JENKINS committed Aug 7, 2014
1 parent 85e77b1 commit c70a2261210ab6f2d17a6582842e9f22f6360f3b
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Symfony/Component/Finder/Shell/Shell.php
@@ -55,14 +55,14 @@ public function testCommand($command)
}
// todo: find a better way (command could not be available)
$testCommand = 'command -v ';
$testCommand = 'which ';
if (self::TYPE_WINDOWS === $this->type) {
$testCommand = 'where ';
}
$command = escapeshellcmd($command);
exec($testCommand . $command, $output, $code);
exec($testCommand.$command, $output, $code);
return 0 === $code && count($output) > 0;
}

0 comments on commit c70a226

Please sign in to comment.
You can’t perform that action at this time.