Skip to content

Commit 99e3323

Browse files
Fix checking for "flex-require-dev" in composer.json
1 parent 3f0dc66 commit 99e3323

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Flex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ public function update(Event $event, $operations = [])
356356
$contents = file_get_contents($file);
357357
$json = JsonFile::parseJson($contents);
358358

359-
if (!isset($json['flex-require']) && !isset($json['flex-require'])) {
359+
if (!isset($json['flex-require']) && !isset($json['flex-require-dev'])) {
360360
$this->unpack($event);
361361

362362
return;

src/Options.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function shouldWriteFile(string $file, bool $overwrite): bool
6868
exec('git status --short --ignored --untracked-files=all -- '.ProcessExecutor::escape($file).' 2>&1', $output, $status);
6969

7070
if (0 !== $status) {
71-
return (bool) $this->io && $this->io->askConfirmation(sprintf('Cannot determine the state of the "%s" file, overwrite anyway? [y/N] ', $file), false);
71+
return $this->io && $this->io->askConfirmation(sprintf('Cannot determine the state of the "%s" file, overwrite anyway? [y/N] ', $file), false);
7272
}
7373

7474
if (empty($output[0]) || preg_match('/^[ AMDRCU][ D][ \t]/', $output[0])) {
@@ -78,7 +78,7 @@ public function shouldWriteFile(string $file, bool $overwrite): bool
7878
$name = basename($file);
7979
$name = \strlen($output[0]) - \strlen($name) === strrpos($output[0], $name) ? substr($output[0], 3) : $name;
8080

81-
return (bool) $this->io && $this->io->askConfirmation(sprintf('File "%s" has uncommitted changes, overwrite? [y/N] ', $name), false);
81+
return $this->io && $this->io->askConfirmation(sprintf('File "%s" has uncommitted changes, overwrite? [y/N] ', $name), false);
8282
}
8383

8484
public function toArray(): array

0 commit comments

Comments
 (0)