diff --git a/core/lib/Drupal/Core/Command/DbImportCommand.php b/core/lib/Drupal/Core/Command/DbImportCommand.php
index 5cd5d927653..3401ae0f869 100644
--- a/core/lib/Drupal/Core/Command/DbImportCommand.php
+++ b/core/lib/Drupal/Core/Command/DbImportCommand.php
@@ -36,7 +36,7 @@ class DbImportCommand extends DbCommandBase {
$script = $input->getArgument('script');
if (!is_file($script)) {
$output->writeln('File must exist.');
- return;
+ return 1;
}
$connection = $this->getDatabaseConnection($input);
diff --git a/core/lib/Drupal/Core/Command/InstallCommand.php b/core/lib/Drupal/Core/Command/InstallCommand.php
index 839eb95fdba..2d0ec5d9091 100644
--- a/core/lib/Drupal/Core/Command/InstallCommand.php
+++ b/core/lib/Drupal/Core/Command/InstallCommand.php
@@ -126,6 +126,9 @@ class InstallCommand extends Command {
*
* @throws \Exception
* Thrown when failing to create the $site_path directory or settings.php.
+ *
+ * @return int
+ * The command exit status.
*/
protected function install($class_loader, SymfonyStyle $io, $profile, $langcode, $site_path, $site_name) {
$password = Crypt::randomBytesBase64(12);
@@ -211,6 +214,8 @@ class InstallCommand extends Command {
$progress_bar->finish();
$io->writeln('Username: admin');
$io->writeln("Password: $password");
+
+ return 0;
}
/**