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

Commit 6199932

Browse files
committed
Fix option check
1 parent b172663 commit 6199932

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Command/Bootstrap.php

Lines changed: 9 additions & 1 deletion
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,7 +51,14 @@ 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+
if ($compatibilitySetup) {
5462
$this->compatibilitySetup($output);
5563
} elseif ($input->getOption('customize')) {
5664
$this->customize($output);

0 commit comments

Comments
 (0)