Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4b59267

Browse filesBrowse files
committed
Adding better output to secrets:decrypt-to-local command
1 parent 5c37ab0 commit 4b59267
Copy full SHA for 4b59267

File tree

1 file changed

+15
-1
lines changed
Filter options

1 file changed

+15
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/SecretsDecryptToLocalCommand.php
+15-1Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,25 @@ protected function execute(InputInterface $input, OutputInterface $output): int
6969

7070
$secrets = $this->vault->list(true);
7171

72+
$io->comment(sprintf('%d secret%s found in the vault.', \count($secrets), 1 !== \count($secrets) ? 's' : ''));
73+
74+
$skipped = 0;
7275
if (!$input->getOption('force')) {
7376
foreach ($this->localVault->list() as $k => $v) {
74-
unset($secrets[$k]);
77+
if (isset($secrets[$k])) {
78+
++$skipped;
79+
unset($secrets[$k]);
80+
}
7581
}
7682
}
7783

84+
if ($skipped > 0) {
85+
$io->warning([
86+
sprintf('%d secret%s already overridden in the local vault and will be skipped.', $skipped, 1 !== $skipped ? 's are' : ' is'),
87+
'Use the <info>--force</info> flag to override these.',
88+
]);
89+
}
90+
7891
foreach ($secrets as $k => $v) {
7992
if (null === $v) {
8093
$io->error($this->vault->getLastMessage());
@@ -83,6 +96,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8396
}
8497

8598
$this->localVault->seal($k, $v);
99+
$io->note($this->localVault->getLastMessage());
86100
}
87101

88102
return 0;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.