djmaze 2021-03-03 22:50:13 +01:00
parent 514fe02619
commit a21147e234
2 changed files with 13 additions and 7 deletions

View file

@ -48,13 +48,15 @@ if (isset($options['plugins'])) {
@unlink($tgz_destination);
@unlink("{$tar_destination}.gz");
$tar = new PharData($tar_destination);
$tar->buildFromDirectory('./plugins/', "@{$name}@");
$tar->buildFromDirectory('./plugins/', '/' . \preg_quote("./plugins/{$name}", '/') . '/');
$tar->compress(Phar::GZ);
unlink($tar_destination);
rename("{$tar_destination}.gz", $tgz_destination);
} else {
echo "- {$name} {$version}\n";
}
} else {
echo "- {$name}\n";
}
}

View file

@ -136,12 +136,16 @@ class Manager
{
foreach ($aGlob as $sPathName)
{
$sName = \basename($sPathName);
$sClassName = $this->loadPluginByName($sName);
$aList[] = array(
$sName,
$sClassName::VERSION
);
try {
$sName = \basename($sPathName);
$sClassName = $this->loadPluginByName($sName);
$aList[] = array(
$sName,
$sClassName::VERSION
);
} catch (\Throwable $e) {
\error_log($e->getMessage() . "\n\t{$sPathName}");
}
}
}
else