automatic update run composer install

This commit is contained in:
xiaomlove
2022-02-12 15:48:26 +08:00
parent 379b84b905
commit cf47dedbb3
3 changed files with 15 additions and 3 deletions

View File

@@ -550,13 +550,17 @@ class Install
} else {
$command .= " --force";
}
$this->executeCommand($command);
$this->doLog("[MIGRATE] success.");
}
public function executeCommand($command)
{
$result = exec($command, $output, $result_code);
$this->doLog(sprintf('command: %s, result_code: %s, result: %s', $command, $result_code, $result));
$this->doLog("output: " . json_encode($output));
if ($result_code != 0) {
throw new \RuntimeException(json_encode($output));
} else {
$this->doLog("[MIGRATE] success.");
}
}