Skip to content

Commit

Permalink
Merge pull request #6 from exonet/rja/fix-interactive
Browse files Browse the repository at this point in the history
Fix `--no-interactive` in app
  • Loading branch information
robbinjanssen authored Mar 7, 2022
2 parents a21da6e + d89d02a commit 473e0a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spoof
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $envLoader = (new Loader(__DIR__.'/.env'))
->expect('DESTINATION_URL', 'GITHUB_SECRET', 'GITHUB_TOKEN')
->toEnv(true);

$application = new Application('spoof', '0.0.1');
$application = new Application('spoof', '1.0.1');

$application->add(new PrMergeCommand());
$application->add(new PublishReleaseCommand());
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/PrMergeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected function call(InputInterface $input, OutputInterface $output, array $s
$output->writeLn('');

// Ask confirmation.
if (!$this->confirm($input, $output, 'Is this correct?')) {
if ($input->isInteractive() && !$this->confirm($input, $output, 'Is this correct?')) {
$output->writeLn('User did not confirm. Quit.');

return 1;
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/PublishReleaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$output->writeLn('');

// Ask confirmation.
if (!$this->confirm($input, $output, 'Is this correct?')) {
if ($input->isInteractive() && !$this->confirm($input, $output, 'Is this correct?')) {
$output->writeLn('User did not confirm. Quit.');

return 1;
Expand Down

0 comments on commit 473e0a6

Please sign in to comment.