mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
Merge pull request #802 from crazywhalecc/feat/safe-pack
Check lib-suggest before packing libs
This commit is contained in:
commit
bb5eb64b28
@ -42,6 +42,15 @@ class PackLibCommand extends BuildCommand
|
||||
|
||||
$builder->proveLibs($libraries);
|
||||
$builder->validateLibsAndExts();
|
||||
|
||||
// before pack, check if the dependency tree contains lib-suggests
|
||||
foreach ($libraries as $lib) {
|
||||
if (Config::getLib($lib, 'lib-suggests', []) !== []) {
|
||||
logger()->critical("The library {$lib} has lib-suggests, packing [{$lib_name}] is not safe, abort !");
|
||||
return static::FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($builder->getLibs() as $lib) {
|
||||
if ($lib->getName() !== $lib_name) {
|
||||
// other dependencies: install or build, both ok
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user