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/InstallCommand.php
+64-12Lines changed: 64 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -15,35 +15,87 @@ class InstallCommand extends Command
15
15
protectedfunctionconfigure()
16
16
{
17
17
$this
18
-
->setHelp("Install a new package")
19
-
->setDescription("Add a new package to your leaf app")
20
-
->addArgument("package", InputArgument::REQUIRED, "package to install")
21
-
->addArgument("version", InputArgument::OPTIONAL, "version to install");
18
+
->setHelp('Install a new package')
19
+
->setDescription('Add a new package to your leaf app')
20
+
->addArgument('packages', InputArgument::IS_ARRAY, 'package(s) to install. Can also include a version constraint, e.g. foo/bar or foo/[email protected]');
22
21
}
23
22
24
23
protectedfunctionexecute(InputInterface$input, OutputInterface$output): int
25
24
{
26
-
$package = $input->getArgument("package");
27
-
if (strpos($package, '/') == false) $package = "leafs/$package";
0 commit comments