diff options
-rw-r--r-- | lib/private/App/DependencyAnalyzer.php | 3 | ||||
-rw-r--r-- | tests/lib/App/DependencyAnalyzerTest.php | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/App/DependencyAnalyzer.php b/lib/private/App/DependencyAnalyzer.php index 7adb5d1c574..7b48e81f3eb 100644 --- a/lib/private/App/DependencyAnalyzer.php +++ b/lib/private/App/DependencyAnalyzer.php @@ -197,6 +197,9 @@ class DependencyAnalyzer { if (!is_array($commands)) { $commands = array($commands); } + if (isset($commands['@value'])) { + $commands = [$commands]; + } $os = $this->platform->getOS(); foreach ($commands as $command) { if (isset($command['@attributes']['os']) && $command['@attributes']['os'] !== $os) { diff --git a/tests/lib/App/DependencyAnalyzerTest.php b/tests/lib/App/DependencyAnalyzerTest.php index eb1142afd9d..091479798b3 100644 --- a/tests/lib/App/DependencyAnalyzerTest.php +++ b/tests/lib/App/DependencyAnalyzerTest.php @@ -266,6 +266,7 @@ class DependencyAnalyzerTest extends TestCase { [[], [['@attributes' => ['os' => 'Windows'], '@value' => 'grepp']]], // grep is known on all systems [[], 'grep'], + [[], ['@attributes' => ['os' => 'Linux'], '@value' => 'grep']], ]; } |