You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Toolkit/src/Command/InstallCommand.php
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
106
106
}
107
107
// If more than one kit is available, we ask the user which one to use
108
108
if (($availableKitsCount = \count($availableKits)) > 1) {
109
-
$kitName = $io->choice(null === $recipeName ? 'Which kit do you want to use?' : \sprintf('The recipe "%s" exists in multiple kits. Which one do you want to use?', $recipeName), array_map(fn (Kit$kit) => $kit->manifest->name, $availableKits));
109
+
$kitName = $io->choice(null === $recipeName ? 'Which Kit do you want to use?' : \sprintf('The recipe "%s" exists in multiple Kits. Which one do you want to use?', $recipeName), array_map(fn (Kit$kit) => $kit->manifest->name, $availableKits));
110
110
111
111
foreach ($availableKitsas$availableKit) {
112
112
if ($availableKit->manifest->name === $kitName) {
@@ -117,11 +117,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
117
117
} elseif (1 === $availableKitsCount) {
118
118
$kit = $availableKits[0];
119
119
} else {
120
-
$io->error(
121
-
null === $recipeName
122
-
? 'It seems that no local kits are available and it should not happens. Please open an issue on https://github.com/symfony/ux to report this.'
123
-
: \sprintf("The recipe \"%s\" does not exist in any official kits.\n\nYou can try to run one of the following commands to interactively install recipes:\n%s\n\nOr you can try one of the community kits https://github.com/search?q=topic:ux-toolkit&type=repositories", $recipeName, implode("\n", array_map(fn (string$availableKitName) => \sprintf('$ bin/console %s --kit %s', $this->getName(), $availableKitName), $availableKitNames)))
124
-
);
120
+
if (null === $recipeName) {
121
+
$io->error('It seems that no official kits are available and it should not happens. Please open an issue on https://github.com/symfony/ux to report this.');
122
+
} else {
123
+
$io->error(\sprintf('The recipe "%s" does not exist in any official kits.', $recipeName));
124
+
//$io->error(\sprintf("The recipe \"%s\" does not exist in any official kits.\n\nYou can try to run one of the following commands to interactively install recipes:\n%s\n\nOr you can try one of the community kits https://github.com/search?q=topic:ux-toolkit&type=repositories", $recipeName, implode("\n", array_map(fn (string $availableKitName) => \sprintf('$ bin/console %s --kit %s', $this->getName(), $availableKitName), $availableKitNames))));
Collapse file: src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Alert Dialog, code 1__1.html
Copy file name to clipboardExpand all lines: src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Alert Dialog, code 1__1.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
<!--
2
2
- Kit: Shadcn UI
3
-
- Component: AlertDialog
3
+
- Component: Alert Dialog
4
4
- Code:
5
5
```twig
6
6
<twig:AlertDialog id="delete_account">
Collapse file: src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Alert Dialog, code 2__1.html
Copy file name to clipboardExpand all lines: src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Alert Dialog, code 2__1.html
0 commit comments