/**
* Used for installing extension from a path
*
* @param string $path Path to the extension zip file
*
* @return boolean
*
* @since 4.0.0
*
* @throws \Exception
*/
public function processPathInstallation($path) : bool
{
if (!file_exists($path)) {
$this->ioStyle->warning('The file path specified does not exist.');
return false;
}
$tmpPath = $this->getApplication()->get('tmp_path');
$tmpPath = $tmpPath . '/' . basename($path);
$package = InstallerHelper::unpack($path, true);
if ($package['type'] === false) {
return false;
}
$jInstaller = Installer::getInstance();
$result = $jInstaller->install($package['extractdir']);
InstallerHelper::cleanupInstall($tmpPath, $package['extractdir']);
return $result;
}