Skip to content

Commit 05af236

Browse files
authored
Merge pull request #3 from Kocal/fix/commands-falsy-options
2 parents 0be2024 + 7da0a83 commit 05af236

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Command/BiomeJsCheckCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5353
$process = $this->biomeJs->check(
5454
apply: $input->getOption('apply'),
5555
applyUnsafe: $input->getOption('apply-unsafe'),
56-
formatterEnabled: $input->getOption('formatter-enabled'),
57-
linterEnabled: $input->getOption('linter-enabled'),
58-
organizeImportsEnabled: $input->getOption('organize-imports-enabled'),
56+
formatterEnabled: filter_var($input->getOption('formatter-enabled'), FILTER_VALIDATE_BOOL),
57+
linterEnabled: filter_var($input->getOption('linter-enabled'), FILTER_VALIDATE_BOOL),
58+
organizeImportsEnabled: filter_var($input->getOption('organize-imports-enabled'), FILTER_VALIDATE_BOOL),
5959
staged: $input->getOption('staged'),
6060
changed: $input->getOption('changed'),
6161
since: $input->getOption('since'),

src/Command/BiomeJsCiCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
4949
$this->biomeJs->setOutput($this->io);
5050

5151
$process = $this->biomeJs->ci(
52-
formatterEnabled: $input->getOption('formatter-enabled'),
53-
linterEnabled: $input->getOption('linter-enabled'),
54-
organizeImportsEnabled: $input->getOption('organize-imports-enabled'),
52+
formatterEnabled: filter_var($input->getOption('formatter-enabled'), FILTER_VALIDATE_BOOL),
53+
linterEnabled: filter_var($input->getOption('linter-enabled'), FILTER_VALIDATE_BOOL),
54+
organizeImportsEnabled: filter_var($input->getOption('organize-imports-enabled'), FILTER_VALIDATE_BOOL),
5555
changed: $input->getOption('changed'),
5656
since: $input->getOption('since'),
5757
path: $input->getArgument('path'),

0 commit comments

Comments
 (0)