forked from DisasteR/docker-h5ai
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathclass-setup.php.patch
More file actions
25 lines (21 loc) · 1.1 KB
/
Copy pathclass-setup.php.patch
File metadata and controls
25 lines (21 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/class-setup.php b/class-setup.php
--- a/class-setup.php
+++ b/class-setup.php
@@ -124,9 +124,9 @@
$cmds = Json::load($cmds_cache_path);
if (count($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');
+ $cmds['command'] = Util::exec_0('command -v command 2>/dev/null');
+ $cmds['which'] = Util::exec_0('which which 2>/dev/null');
+ $cmds['where'] = false;
$cmd = match (true) {
$cmds['command'] => 'command -v',
@@ -136,7 +136,7 @@
};
foreach (['avconv', 'convert', 'du', 'ffmpeg', 'gm', 'tar', 'zip'] as $c) {
- $cmds[$c] = ($cmd !== false) && (Util::exec_0($cmd . ' ' . $c) || Util::exec_0($cmd . ' ' . $c . '.exe'));
+ $cmds[$c] = ($cmd !== false) && Util::exec_0($cmd . ' ' . $c . ' 2>/dev/null');
}
Json::save($cmds_cache_path, $cmds);