Skip to content

Commit 021e0e2

Browse files
committed
Check for values
We want to check the value of the options. they always exist when they are part of the input definition.
1 parent a380e47 commit 021e0e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/guides-cli/src/Command/SettingsBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ public function overrideWithInput(InputInterface $input): void
7474
$settings->setInputFormat((string) $input->getOption('input-format'));
7575
}
7676

77-
if ($input->hasOption('log-path')) {
77+
if ($input->getOption('log-path')) {
7878
$settings->setLogPath((string) $input->getOption('log-path'));
7979
}
8080

81-
if ($input->hasOption('fail-on-error')) {
81+
if ($input->getOption('fail-on-error')) {
8282
$settings->setFailOnError(LogLevel::ERROR);
8383
}
8484

85-
if ($input->hasOption('fail-on-log')) {
85+
if ($input->getOption('fail-on-log')) {
8686
$settings->setFailOnError(LogLevel::WARNING);
8787
}
8888

0 commit comments

Comments
 (0)