Replace some more "command -v" calls with the Helper method
This commit is contained in:
parent
6fb2477fb7
commit
0274dcba57
2 changed files with 4 additions and 9 deletions
|
@ -139,13 +139,8 @@ class SMB extends \OC\Files\Storage\StreamWrapper{
|
|||
* check if smbclient is installed
|
||||
*/
|
||||
public static function checkDependencies() {
|
||||
if (function_exists('shell_exec')) {
|
||||
$output=shell_exec('command -v smbclient 2> /dev/null');
|
||||
if (!empty($output)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return array('smbclient');
|
||||
$smbClientExists = (bool) \OC_Helper::findBinaryPath('smbclient');
|
||||
return $smbClientExists ? true : array('smbclient');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -558,8 +558,8 @@ class OC_Installer{
|
|||
// is the code checker enabled?
|
||||
if(OC_Config::getValue('appcodechecker', true)) {
|
||||
// check if grep is installed
|
||||
$grep = exec('command -v grep');
|
||||
if($grep=='') {
|
||||
$grep = \OC_Helper::findBinaryPath('grep');
|
||||
if (!$grep) {
|
||||
OC_Log::write('core',
|
||||
'grep not installed. So checking the code of the app "'.$appname.'" was not possible',
|
||||
OC_Log::ERROR);
|
||||
|
|
Loading…
Reference in a new issue