Skip to content

Commit

Permalink
Merge pull request #508 from nextcloud/fix/occ-env-var
Browse files Browse the repository at this point in the history
fix: correct env var parsing when there is only one entry
  • Loading branch information
oleksandr-nc authored Feb 12, 2025
2 parents 850c137 + 7cd7ca1 commit 4fa114f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Service/ExAppService.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ public function getAppInfo(string $appId, ?string $infoXml, ?string $jsonInfo, ?
// Advanced deploy options
if (isset($appInfo['external-app']['environment-variables']['variable'])) {
$envVars = [];
if (!isset($appInfo['external-app']['environment-variables']['variable'][0])) {
$appInfo['external-app']['environment-variables']['variable'] = [$appInfo['external-app']['environment-variables']['variable']];
}
foreach ($appInfo['external-app']['environment-variables']['variable'] as $envVar) {
$envVars[$envVar['name']] = [
'name' => $envVar['name'],
Expand Down

0 comments on commit 4fa114f

Please sign in to comment.