Skip to content

Commit

Permalink
Not confirming exit with an error
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed May 17, 2024
1 parent 1d78973 commit 97f788d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Service/AbstractDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private static function absolutePath(string $file): string
* Ask confirmation to user (y/n), unless if we are really sure that we are in local development,
* or if command argument `--no-interaction` is given.
*
* If the user does not confirm, the program will exist immediately.
* If the user does not confirm, the program will exit immediately.
*/
public static function confirm(string $question): void
{
Expand All @@ -242,7 +242,7 @@ public static function confirm(string $question): void

$confirm = readline() ?: '';
if (!preg_match('/^y(es)?$/', $confirm)) {
exit();
exit(1);
}
}
}

0 comments on commit 97f788d

Please sign in to comment.