Issue #3099295 by DukeandGrace, ravi.shankar, Chi, mradcliffe: Always return exit code in Symfony console commands
parent
a95e1114cc
commit
26189c6f2d
|
@ -36,7 +36,7 @@ class DbImportCommand extends DbCommandBase {
|
||||||
$script = $input->getArgument('script');
|
$script = $input->getArgument('script');
|
||||||
if (!is_file($script)) {
|
if (!is_file($script)) {
|
||||||
$output->writeln('File must exist.');
|
$output->writeln('File must exist.');
|
||||||
return;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$connection = $this->getDatabaseConnection($input);
|
$connection = $this->getDatabaseConnection($input);
|
||||||
|
|
|
@ -126,6 +126,9 @@ class InstallCommand extends Command {
|
||||||
*
|
*
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* Thrown when failing to create the $site_path directory or settings.php.
|
* 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) {
|
protected function install($class_loader, SymfonyStyle $io, $profile, $langcode, $site_path, $site_name) {
|
||||||
$password = Crypt::randomBytesBase64(12);
|
$password = Crypt::randomBytesBase64(12);
|
||||||
|
@ -211,6 +214,8 @@ class InstallCommand extends Command {
|
||||||
$progress_bar->finish();
|
$progress_bar->finish();
|
||||||
$io->writeln('<info>Username:</info> admin');
|
$io->writeln('<info>Username:</info> admin');
|
||||||
$io->writeln("<info>Password:</info> $password");
|
$io->writeln("<info>Password:</info> $password");
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue