Skip to content

Commit ca3ad40

Browse files
committed
Fixes the input option value
1 parent a38a1c7 commit ca3ad40

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
77

88
## [Unreleased]
99

10+
### Fixed
11+
- The `--force` option of the `create` command doesn't expect a value anymore.
12+
1013
### Added
1114
- New `validate-remote` command to validate, create, or update the `.gitattributes` file of a cloned GitHub repository.
1215

‎src/Commands/CreateCommand.php‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ protected function configure(): void
5353
$this->addOption(
5454
'force',
5555
null,
56-
InputOption::VALUE_REQUIRED,
57-
'Force the creation of the .gitattributes file even if one already exists',
58-
false
56+
InputOption::VALUE_NONE,
57+
'Force the creation of the .gitattributes file even if one already exists'
5958
);
6059

6160
$flavourDescription = 'Generate the .gitattributes file with the given flavour';

‎tests/Commands/CreateCommandTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public function createsANewGitattributesFileIfForceOptionIsSet(): void
339339

340340
TestCommand::for($this->getCommandInstance())
341341
->addArgument($this->temporaryDirectory)
342-
->addOption('force', true)
342+
->addOption('force')
343343
->execute()
344344
->assertSuccessful()
345345
->assertOutputContains('A .gitattributes file has been created in ' . (\realpath($this->temporaryDirectory) ?: $this->temporaryDirectory) . '.');

0 commit comments

Comments
 (0)