Update class-setup.php

Windows用にwhereコマンドに対応
This commit is contained in:
Fox Ears 2020-08-18 12:07:09 +09:00 committed by GitHub
parent d81d8a9298
commit c122d5e44a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -122,12 +122,15 @@ class Setup {
if (sizeof($cmds) === 0 || $this->refresh) {
$cmds['command'] = Util::exec_0('command -v command');
$cmds['which'] = Util::exec_0('which which') || Util::exec_0('which which.exe');
$cmds['where'] = Util::exec_0('where where.exe');
$cmd = false;
if ($cmds['command']) {
$cmd = 'command -v';
} elseif ($cmds['which']) {
$cmd = 'which';
} elseif ($cmds['where']) {
$cmd = 'where';
}
foreach (['avconv', 'convert', 'du', 'ffmpeg', 'gm', 'tar', 'zip'] as $c) {