diff --git a/spoof b/spoof index 9c2dcb7..3f00191 100755 --- a/spoof +++ b/spoof @@ -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()); diff --git a/src/Commands/PrMergeCommand.php b/src/Commands/PrMergeCommand.php index 9a5c10d..c1e5907 100644 --- a/src/Commands/PrMergeCommand.php +++ b/src/Commands/PrMergeCommand.php @@ -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; diff --git a/src/Commands/PublishReleaseCommand.php b/src/Commands/PublishReleaseCommand.php index 2dadae5..5d7da2d 100644 --- a/src/Commands/PublishReleaseCommand.php +++ b/src/Commands/PublishReleaseCommand.php @@ -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;