diff --git a/src/DependencyResolver/DependencyInstaller/PrescanSystemDependencies.php b/src/DependencyResolver/DependencyInstaller/PrescanSystemDependencies.php index b4bd0f23..9d120f8e 100644 --- a/src/DependencyResolver/DependencyInstaller/PrescanSystemDependencies.php +++ b/src/DependencyResolver/DependencyInstaller/PrescanSystemDependencies.php @@ -99,7 +99,7 @@ static function (DependencyStatus $dependencyStatus): bool { $this->io->write(sprintf('Need to install missing system dependencies: %s', $proposedInstallCommand)); if ($this->io->isInteractive() && ! $autoInstallIfMissing) { - if (! $this->io->askConfirmation('Would you like to install them now?', false)) { + if (! $this->io->askConfirmation('Would you like to install them now? [y/N]', false)) { $this->io->write('Ok, but things might not work. Just so you know.'); return; diff --git a/src/SelfManage/BuildTools/CheckAllBuildTools.php b/src/SelfManage/BuildTools/CheckAllBuildTools.php index 7d342848..72870c11 100644 --- a/src/SelfManage/BuildTools/CheckAllBuildTools.php +++ b/src/SelfManage/BuildTools/CheckAllBuildTools.php @@ -171,7 +171,7 @@ public function check(IOInterface $io, PackageManager|null $packageManager, Targ $io->write('The following command will be run: ' . $proposedInstallCommand, verbosity: IOInterface::VERBOSE); if ($io->isInteractive() && ! $autoInstallIfMissing) { - if (! $io->askConfirmation('Would you like to install them now?', false)) { + if (! $io->askConfirmation('Would you like to install them now? [y/N]', false)) { $io->write('Ok, but things might not work. Just so you know.'); return; diff --git a/test/unit/SelfManage/BuildTools/CheckAllBuildToolsTest.php b/test/unit/SelfManage/BuildTools/CheckAllBuildToolsTest.php index c8e89f40..ecd756d3 100644 --- a/test/unit/SelfManage/BuildTools/CheckAllBuildToolsTest.php +++ b/test/unit/SelfManage/BuildTools/CheckAllBuildToolsTest.php @@ -79,6 +79,7 @@ public function testCheckInstallsMissingToolWhenPromptedInInteractiveMode(): voi $outputString = $io->getOutput(); self::assertStringContainsString('Checking if all build tools are installed.', $outputString); self::assertStringContainsString('The following build tools are missing: bloop', $outputString); + self::assertStringContainsString('Would you like to install them now? [y/N]', $outputString); self::assertStringContainsString('The following command will be run: echo "fake installing coreutils"', $outputString); self::assertStringContainsString('Missing build tools have been installed.', $outputString); }