Skip to content
Snippets Groups Projects
Commit e32968cf authored by Joas Schilling's avatar Joas Schilling
Browse files

Remove exec() call with invalid name on windows

Currently running unit tests prints the following message 3 times:
The command "command" is misspelt or could not be found.
Instead of trying this, we just skip this now.
parent 284ba5b6
No related branches found
No related tags found
No related merge requests found
......@@ -123,7 +123,7 @@ $template->printPage();
* @return null|string
*/
function findBinaryPath($program) {
if (OC_Helper::is_function_enabled('exec')) {
if (!\OC_Util::runningOnWindows() && \OC_Helper::is_function_enabled('exec')) {
exec('command -v ' . escapeshellarg($program) . ' 2> /dev/null', $output, $returnCode);
if ($returnCode === 0 && count($output) > 0) {
return escapeshellcmd($output[0]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment