public function easyInstall() : bool
{
try {
$install = $this->download();
if (!$this->verifySignature($install)) {
self::$continuumLogger->store(LogLevel::ALERT, 'Install failed -- invalid signature', $this->getLogContext($install));
return false;
}
if (!$this->verifyMerkleRoot($install)) {
self::$continuumLogger->store(LogLevel::ALERT, 'Install failed -- Merkle root mismatch', $this->getLogContext($install));
return false;
}
if (!$this->verifyChecksum($install)) {
return false;
}
if (!$this->install($install)) {
self::$continuumLogger->store(LogLevel::ALERT, 'Install failed -- checksum not registered in Keyggdrasil', $this->getLogContext($install));
return false;
}
// Clear the cache, since we just installed something.
$this->markPackageInstalled($install);
$this->clearCache();
return true;
} catch (\Throwable $ex) {
$this->log($ex->getMessage(), LogLevel::ERROR, ['exception_type' => \get_class($ex), 'exception' => \Airship\throwableToArray($ex)]);
}
// Easy mode just returns false.
return false;
}