Skip to content

Commit 7c59365

Browse files
authored
Merge pull request #651 from yilanboy/update-prompt-to-enhance-ux
refactor: enhance UX for missing build tools prompt
2 parents 4aa6102 + 11a912e commit 7c59365

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/DependencyResolver/DependencyInstaller/PrescanSystemDependencies.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static function (DependencyStatus $dependencyStatus): bool {
9999
$this->io->write(sprintf('<info>Need to install missing system dependencies:</info> %s', $proposedInstallCommand));
100100

101101
if ($this->io->isInteractive() && ! $autoInstallIfMissing) {
102-
if (! $this->io->askConfirmation('<question>Would you like to install them now?</question>', false)) {
102+
if (! $this->io->askConfirmation('<question>Would you like to install them now? [y/N]</question>', false)) {
103103
$this->io->write('<comment>Ok, but things might not work. Just so you know.</comment>');
104104

105105
return;

src/SelfManage/BuildTools/CheckAllBuildTools.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public function check(IOInterface $io, PackageManager|null $packageManager, Targ
171171
$io->write('The following command will be run: ' . $proposedInstallCommand, verbosity: IOInterface::VERBOSE);
172172

173173
if ($io->isInteractive() && ! $autoInstallIfMissing) {
174-
if (! $io->askConfirmation('<question>Would you like to install them now?</question>', false)) {
174+
if (! $io->askConfirmation('<question>Would you like to install them now? [y/N]</question>', false)) {
175175
$io->write('<comment>Ok, but things might not work. Just so you know.</comment>');
176176

177177
return;

test/unit/SelfManage/BuildTools/CheckAllBuildToolsTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public function testCheckInstallsMissingToolWhenPromptedInInteractiveMode(): voi
7979
$outputString = $io->getOutput();
8080
self::assertStringContainsString('Checking if all build tools are installed.', $outputString);
8181
self::assertStringContainsString('The following build tools are missing: bloop', $outputString);
82+
self::assertStringContainsString('Would you like to install them now? [y/N]', $outputString);
8283
self::assertStringContainsString('The following command will be run: echo "fake installing coreutils"', $outputString);
8384
self::assertStringContainsString('Missing build tools have been installed.', $outputString);
8485
}

0 commit comments

Comments
 (0)