diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-08-24 13:09:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 13:09:55 +0200 |
commit | bd7ab89d2a1ecbebe2e3fcba7bb3a1fc4d06c17b (patch) | |
tree | d7be2fddcd0da4baeceb2d25be59a50e3adf85c5 /lib/private/App/Platform.php | |
parent | 03c8bf70674574146fbdbd86423161a3fe9a5136 (diff) | |
parent | 9b8ca9ad1f3df5d32df241d8848c8dc92c9a1fc2 (diff) | |
download | nextcloud-server-bd7ab89d2a1ecbebe2e3fcba7bb3a1fc4d06c17b.tar.gz nextcloud-server-bd7ab89d2a1ecbebe2e3fcba7bb3a1fc4d06c17b.zip |
Merge pull request #33593 from nextcloud/improve-binary-caching
Move findBinaryFinder and isFunctionEnabled away from OC_Helper
Diffstat (limited to 'lib/private/App/Platform.php')
-rw-r--r-- | lib/private/App/Platform.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/App/Platform.php b/lib/private/App/Platform.php index 15966d85c34..01bf6748654 100644 --- a/lib/private/App/Platform.php +++ b/lib/private/App/Platform.php @@ -26,6 +26,7 @@ namespace OC\App; use OCP\IConfig; +use OCP\IBinaryFinder; /** * Class Platform @@ -70,9 +71,8 @@ class Platform { /** * @param $command */ - public function isCommandKnown($command): bool { - $path = \OC_Helper::findBinaryPath($command); - return ($path !== null); + public function isCommandKnown(string $command): bool { + return \OCP\Server::get(IBinaryFinder::class)->findBinaryPath($command) !== false; } public function getLibraryVersion(string $name): ?string { |