Skip to content

Commit 2921d10

Browse files
authored
Overwrite all files when in non interactive mode
1 parent c824772 commit 2921d10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Options.php

+2-2
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 $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));
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 $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));
8282
}
8383

8484
public function toArray(): array

0 commit comments

Comments
 (0)