Skip to content
This repository was archived by the owner on Feb 20, 2023. It is now read-only.

Commit d0ccae4

Browse files
committed
Fix option check
1 parent b172663 commit d0ccae4

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

src/Command/Bootstrap.php

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
use Cake\Codeception\Lib\Generator\Helper;
55
use Cake\Shell\ServerShell;
6+
use Symfony\Component\Console\Exception\InvalidArgumentException;
67
use Symfony\Component\Console\Input\ArrayInput;
78
use Symfony\Component\Console\Input\InputInterface;
89
use Symfony\Component\Console\Output\OutputInterface;
@@ -50,9 +51,24 @@ public function execute(InputInterface $input, OutputInterface $output)
5051
"<fg=white;bg=magenta>Initializing Codeception in " . $realpath . "</fg=white;bg=magenta>\n"
5152
);
5253

53-
if ($input->getOption('compat')) {
54+
$compatibilitySetup = false;
55+
try {
56+
$compatibilitySetup = $input->getOption('compat');
57+
} catch (InvalidArgumentException $e) {
58+
$compatibilitySetup = false;
59+
}
60+
61+
62+
$customize = false;
63+
try {
64+
$customize = $input->getOption('customize');
65+
} catch (InvalidArgumentException $e) {
66+
$customize = false;
67+
}
68+
69+
if ($compatibilitySetup) {
5470
$this->compatibilitySetup($output);
55-
} elseif ($input->getOption('customize')) {
71+
} elseif ($customize) {
5672
$this->customize($output);
5773
} else {
5874
$this->setup($output);

0 commit comments

Comments
 (0)