Skip to content

Commit dc22e00

Browse files
author
Tasha Harrison
committed
CMS-1244 run cim before updb
1 parent 4124439 commit dc22e00

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

src/Command/Site/UpdateCommand.php

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ protected function execute(InputInterface $input, OutputInterface $output) {
6464

6565
// Drupal 8 only;
6666
if ($this->getDrupalVersion() === 8) {
67+
$commands[] = 'drush cim -y';
68+
$commands[] = 'drush cr';
6769
$commands[] = 'drush updb -y';
70+
$commands[] = 'drush cr';
6871
$this->addModuleEnableCommands($commands);
6972
$this->addModuleDisableCommands($commands);
7073

@@ -85,24 +88,6 @@ protected function execute(InputInterface $input, OutputInterface $output) {
8588
throw new CommandException($shellProcess->getOutput());
8689
}
8790

88-
// We run config:import separately so that if there's no config and it
89-
// fails we can continue. Previously, we checked the config folder, but this
90-
// was a quick fix.
91-
if ($this->getDrupalVersion() === 8) {
92-
$config_commands[] = sprintf('cd %s', $this->shellPath($this->getWebRoot()));
93-
$config_commands[] = 'drush cim -y';
94-
$config_commands[] = 'drush cr';
95-
$config_command = implode(' && ', $config_commands);
96-
97-
$this->io->commentBlock($config_command);
98-
99-
try {
100-
$shellProcess->exec($config_command, TRUE);
101-
}
102-
catch (ProcessFailedException $e) {
103-
}
104-
}
105-
10691
}
10792

10893
/**

0 commit comments

Comments
 (0)