Skip to content

Commit dfd77d6

Browse files
committed
explode ids
1 parent d5b0202 commit dfd77d6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Keboola/Console/Command/DeletedProjectsPurge.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protected function configure()
1919
->setDescription('Purge deleted projects.')
2020
->addArgument('url', InputArgument::REQUIRED, 'URL of stack including https://')
2121
->addArgument('token', InputArgument::REQUIRED, 'manage api token')
22-
->addArgument('projectIds', InputArgument::IS_ARRAY | InputArgument::REQUIRED, 'IDs of projects to purge (separate multiple IDs with a space)')
22+
->addArgument('projectIds', InputArgument::REQUIRED, 'IDs of projects to purge (separate multiple IDs with a space)')
2323
->addOption('ignore-backend-errors', null, InputOption::VALUE_NONE, "Ignore errors from backend and just delete buckets and workspaces metadata")
2424
->addOption('force', null, InputOption::VALUE_NONE, 'Actually perform destructive operations (purge). Without this flag, the command will only simulate actions.');
2525
}
@@ -45,6 +45,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
4545
'url' => $url,
4646
'token' => $token,
4747
]);
48+
$projectIds = array_filter(explode(',', $projectIds), 'is_numeric');
4849

4950
foreach ($projectIds as $projectId) {
5051
$this->purgeProject(

0 commit comments

Comments
 (0)