8000 bug #43137 [FrameworkBundle] Avoid secrets:decrypt-to-local command t… · symfony/symfony@1636a26 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1636a26

Browse files
bug #43137 [FrameworkBundle] Avoid secrets:decrypt-to-local command to fail (noniagriconomie)
This PR was merged into the 4.4 branch. Discussion ---------- [FrameworkBundle] Avoid secrets:decrypt-to-local command to fail | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #42038 | License | MIT | Doc PR | . Small PR to fix this issue I encounter as well For now I've not opted for solutions exposed in the issue, please discuss here Also, I kept the vault continuing instead of stopping the command in case of null value Thank you, Commits ------- b52451c [FrameworkBundle] Avoid secrets:decrypt-to-local command to fail
2 parents f5d9d1d + b52451c commit 1636a26

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/SecretsDecryptToLocalCommand.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7777

7878
foreach ($secrets as $k => $v) {
7979
if (null === $v) {
80-
$io->error($this->vault->getLastMessage());
81-
82-
return 1;
80+
$io->error($this->vault->getLastMessage() ?? sprintf('Secret "%s" has been skipped as there was an error reading it.', $k));
81+
continue;
8382
}
8483

8584
$this->localVault->seal($k, $v);

0 commit comments

Comments
 (0)
0