@@ -87,6 +87,7 @@ protected function configure()
87
87
protected function execute (InputInterface $ input , OutputInterface $ output )
88
88
{
89
89
try {
90
+ $ resultCode = \Magento \Framework \Console \Cli::RETURN_SUCCESS ;
90
91
$ keepGenerated = $ input ->getOption (self ::INPUT_KEY_KEEP_GENERATED );
91
92
$ installer = $ this ->installerFactory ->create (new ConsoleLogger ($ output ));
92
93
$ installer ->updateModulesSequence ($ keepGenerated );
@@ -97,15 +98,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
97
98
$ importConfigCommand = $ this ->getApplication ()->find (ConfigImportCommand::COMMAND_NAME );
98
99
$ arrayInput = new ArrayInput ([]);
99
100
$ arrayInput ->setInteractive ($ input ->isInteractive ());
100
- $ result = $ importConfigCommand ->run ($ arrayInput , $ output );
101
- if ($ result === \Magento \Framework \Console \Cli::RETURN_FAILURE ) {
102
- throw new \Magento \Framework \Exception \RuntimeException (
103
- __ ('%1 failed. See previous output. ' , ConfigImportCommand::COMMAND_NAME )
104
- );
105
- }
101
+ $ resultCode = $ importConfigCommand ->run ($ arrayInput , $ output );
106
102
}
107
103
108
- if (!$ keepGenerated && $ this ->appState ->getMode () === AppState::MODE_PRODUCTION ) {
104
+ if ($ resultCode !== \Magento \Framework \Console \Cli::RETURN_FAILURE
105
+ && !$ keepGenerated && $ this ->appState ->getMode () === AppState::MODE_PRODUCTION ) {
109
106
$ output ->writeln (
110
107
'<info>Please re-run Magento compile command. Use the command "setup:di:compile"</info> '
111
108
);
@@ -115,6 +112,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
115
112
return \Magento \Framework \Console \Cli::RETURN_FAILURE ;
116
113
}
117
114
118
- return \ Magento \ Framework \ Console \Cli:: RETURN_SUCCESS ;
115
+ return $ resultCode ;
119
116
}
120
117
}
0 commit comments