change command to which available under most unix systems
agree i will change it which is available under suse, ubuntu, debian, fedora, bsd
This commit is contained in:
parent
85e77b14f7
commit
c70a226121
@ -55,14 +55,14 @@ class Shell
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user