Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c70a226

Browse files
gimlerASA1-ET-JENKINS
authored andcommitted
change command to which available under most unix systems
agree i will change it which is available under suse, ubuntu, debian, fedora, bsd
1 parent 85e77b1 commit c70a226

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Finder/Shell/Shell.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ public function testCommand($command)
5555
}
5656

5757
// todo: find a better way (command could not be available)
58-
$testCommand = 'command -v ';
58+
$testCommand = 'which ';
5959
if (self::TYPE_WINDOWS === $this->type) {
6060
$testCommand = 'where ';
6161
}
6262

6363
$command = escapeshellcmd($command);
6464

65-
exec($testCommand . $command, $output, $code);
65+
exec($testCommand.$command, $output, $code);
6666

6767
return 0 === $code && count($output) > 0;
6868
}

0 commit comments

Comments
 (0)