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($tgz_destination);
@unlink("{$tar_destination}.gz"); @unlink("{$tar_destination}.gz");
$tar = new PharData($tar_destination); $tar = new PharData($tar_destination);
$tar->buildFromDirectory('./plugins/', "@{$name}@"); $tar->buildFromDirectory('./plugins/', '/' . \preg_quote("./plugins/{$name}", '/') . '/');
$tar->compress(Phar::GZ); $tar->compress(Phar::GZ);
unlink($tar_destination); unlink($tar_destination);
rename("{$tar_destination}.gz", $tgz_destination); rename("{$tar_destination}.gz", $tgz_destination);
} else { } else {
echo "- {$name} {$version}\n"; echo "- {$name} {$version}\n";
} }
} else {
echo "- {$name}\n";
} }
} }

View file

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