We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b31f801 commit b3666a6Copy full SHA for b3666a6
1 file changed
src/Configuration/ConfigurationFactory.php
@@ -54,6 +54,16 @@ public function createFromInput(InputInterface $input): Configuration
54
$isDryRun = (bool) $input->getOption(Option::DRY_RUN);
55
$shouldClearCache = (bool) $input->getOption(Option::CLEAR_CACHE);
56
57
+ if (! $shouldClearCache) {
58
+ // hasOption() always returns true
59
+ // so we use getOption() instead
60
+ $onlyRule = $input->getOption(Option::ONLY);
61
+ // when --only used, clear cache to ensure next normal run start from fresh state
62
+ if ($onlyRule !== null) {
63
+ $shouldClearCache = true;
64
+ }
65
66
+
67
$outputFormat = (string) $input->getOption(Option::OUTPUT_FORMAT);
68
$showProgressBar = $this->shouldShowProgressBar($input, $outputFormat);
69
0 commit comments