"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "dfedeb5644f1db57e37ec243b28033ee",
+ "content-hash": "4f9274d16374a47807601a331304aaae",
"packages": [
{
"name": "graham-campbell/result-type",
use Cli\Services\Paths;
use Cli\Services\ProgramRunner;
use Cli\Services\RequirementsValidator;
+use Phar;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
$composerLocator->download();
}
+ $cliPath = Phar::running(false);
+ $cliPreUpdateHash = $cliPath ? hash_file('sha256', $cliPath) : '';
+
$output->writeln("<info>Fetching latest code via Git...</info>");
$this->updateCodeUsingGit($appDir);
+ $cliPostUpdateHash = $cliPath ? hash_file('sha256', $cliPath) : '';
+ if ($cliPostUpdateHash !== $cliPreUpdateHash) {
+ $output->writeln("<error>System CLI file changed during update!\nRe-run the update command to complete the update process.</error>");
+ return Command::FAILURE;
+ }
+
$output->writeln("<info>Installing PHP dependencies via composer...</info>");
$this->installComposerDependencies($composer, $appDir);