Skip to content

Commit 2bac51c

Browse files
ENGCOM-5395: magento/magento-2#23222: setup:upgrade should return failure when app… #23310
- Merge Pull Request #23310 from ProcessEight/magento2:23222-setup-upgrade-should-return-failure-when-app-config-import-failed - Merged commits: 1. 8c4667a 2. 671876e
2 parents f94b4a8 + 671876e commit 2bac51c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

setup/src/Magento/Setup/Console/Command/UpgradeCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
126126
$importConfigCommand = $this->getApplication()->find(ConfigImportCommand::COMMAND_NAME);
127127
$arrayInput = new ArrayInput([]);
128128
$arrayInput->setInteractive($input->isInteractive());
129-
$importConfigCommand->run($arrayInput, $output);
129+
$result = $importConfigCommand->run($arrayInput, $output);
130+
if ($result === \Magento\Framework\Console\Cli::RETURN_FAILURE) {
131+
throw new \Magento\Framework\Exception\RuntimeException(__('%1 failed. See previous output.', ConfigImportCommand::COMMAND_NAME));
132+
}
130133
}
131134

132135
if (!$keepGenerated && $this->appState->getMode() === AppState::MODE_PRODUCTION) {

0 commit comments

Comments
 (0)