Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
// we must have an exit code higher than zero to indicate something was wrong
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
}
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
. '</info>'
);
}
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Symfony\Component\Console\Input\InputOption;
use Magento\Framework\App\DeploymentConfig;
use Magento\Framework\Module\Status;
use Magento\Framework\Console\Cli;

abstract class AbstractModuleManageCommand extends AbstractModuleCommand
{
Expand Down Expand Up @@ -77,14 +78,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (!empty($messages)) {
$output->writeln(implode(PHP_EOL, $messages));
// we must have an exit code higher than zero to indicate something was wrong
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
return Cli::RETURN_FAILURE;
}
try {
$modulesToChange = $this->getStatus()->getModulesToChange($isEnable, $modules);
} catch (\LogicException $e) {
$output->writeln('<error>' . $e->getMessage() . '</error>');
// we must have an exit code higher than zero to indicate something was wrong
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
return Cli::RETURN_FAILURE;
}
if (!empty($modulesToChange)) {
$force = $input->getOption(self::INPUT_KEY_FORCE);
Expand All @@ -96,7 +97,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
);
$output->writeln('<error>' . implode("</error>\n<error>", $constraints) . '</error>');
// we must have an exit code higher than zero to indicate something was wrong
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
return Cli::RETURN_FAILURE;
}
}
$this->setIsEnabled($isEnable, $modulesToChange, $output);
Expand All @@ -111,6 +112,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
} else {
$output->writeln('<info>No modules were changed.</info>');
}
return Cli::RETURN_SUCCESS;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln(
'<info>Created Magento administrator user named ' . $input->getOption(AdminAccount::KEY_USER) . '</info>'
);
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ function ($value) {
$output->writeln('<info>You made no changes to the configuration.</info>');
}
}
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
$installer = $this->installFactory->create(new ConsoleLogger($output));
$installer->installDataFixtures();
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
$installer = $this->installFactory->create(new ConsoleLogger($output));
$installer->installSchema($input->getOptions());
return null;
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}
}
6 changes: 4 additions & 2 deletions setup/src/Magento/Setup/Console/Command/DiCompileCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Magento\Setup\Module\Di\App\Task\OperationInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\ProgressBar;
use Magento\Framework\Console\Cli;

/**
* Command to run compile in single-tenant mode
Expand Down Expand Up @@ -141,7 +142,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln($line);
}
// we must have an exit code higher than zero to indicate something was wrong
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
return Cli::RETURN_FAILURE;
}

$modulePaths = $this->componentRegistrar->getPaths(ComponentRegistrar::MODULE);
Expand Down Expand Up @@ -211,8 +212,9 @@ function (OperationInterface $operation) use ($progressBar) {
} catch (OperationException $e) {
$output->writeln('<error>' . $e->getMessage() . '</error>');
// we must have an exit code higher than zero to indicate something was wrong
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
return Cli::RETURN_FAILURE;
}
return Cli::RETURN_SUCCESS;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
// we must have an exit code higher than zero to indicate something was wrong
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
}
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$input->getOption(self::INPUT_KEY_MAGENTO)
);
$output->writeln('<info>Dictionary successfully processed.</info>');
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$input->getOption(self::INPUT_KEY_ALLOW_DUPLICATES)
);
$output->writeln("<info>Successfully saved $locale language package.</info>");
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
. $this->deploymentConfig->get(BackendConfigOptionsList::CONFIG_PATH_BACKEND_FRONTNAME)
. "\n"
);
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
if (empty($tempTable)) {
$output->writeln('<info>No backup files found.</info>');
return;
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}
$output->writeln("<info>Showing backup files in $backupsDir.</info>");
/** @var \Symfony\Component\Console\Helper\Table $table */
Expand All @@ -101,5 +101,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
} else {
$output->writeln('<info>No backup files found.</info>');
}

return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$table->render($output);
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$table->render($output);
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$table->render($output);
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
$installer = $this->installerFactory->create(new ConsoleLogger($output));
$installer->installUserConfig($input->getOptions());
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->maintenanceMode->setAddresses('');
$output->writeln('<info>Set exempt IP-addresses: none</info>');
}
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$addressInfo = $this->maintenanceMode->getAddressInfo();
$addresses = implode(' ', $addressInfo);
$output->writeln('<info>List of exempt IP-addresses: ' . ($addresses ? $addresses : 'none') . '</info>');
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
} else {
$output->writeln(join("\n", $disabledModules));
}
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
'<error>You cannot run this command because the Magento application is not installed.</error>'
);
// we must have an exit code higher than zero to indicate something was wrong
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
return Cli::RETURN_FAILURE;
}

$modules = $input->getArgument(self::INPUT_KEY_MODULES);
Expand All @@ -249,15 +249,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (!empty($messages)) {
$output->writeln($messages);
// we must have an exit code higher than zero to indicate something was wrong
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
return Cli::RETURN_FAILURE;
}

// check dependencies
$dependencyMessages = $this->checkDependencies($modules);
if (!empty($dependencyMessages)) {
$output->writeln($dependencyMessages);
// we must have an exit code higher than zero to indicate something was wrong
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
return Cli::RETURN_FAILURE;
}

$helper = $this->getHelper('question');
Expand All @@ -266,7 +266,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
false
);
if (!$helper->ask($input, $output, $question) && $input->isInteractive()) {
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
return Cli::RETURN_FAILURE;
}

$result = $this->maintenanceModeEnabler->executeInMaintenanceMode(
Expand Down Expand Up @@ -298,11 +298,11 @@ function () use ($input, $output, $modules, $helper) {
$this->moduleUninstaller->uninstallCode($output, $modules);
$this->cleanup($input, $output);

return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
return Cli::RETURN_SUCCESS;
} catch (\Exception $e) {
$output->writeln('<error>' . $e->getMessage() . '</error>');
$output->writeln('<error>Please disable maintenance mode after you resolved above issues</error>');
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
return Cli::RETURN_FAILURE;
}
},
$output,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$installer = $this->installerFactory->create(new ConsoleLogger($output));
$installer->uninstall();
}
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
}
}