mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-05 15:55:39 +08:00
Allow fallback to builder options
This commit is contained in:
@@ -80,6 +80,14 @@ class TargetPackage extends LibraryPackage
|
||||
if ($input !== null && $input->hasOption($key)) {
|
||||
return $input->getOption($key);
|
||||
}
|
||||
|
||||
// try builder options
|
||||
$builder = ApplicationContext::has(PackageBuilder::class)
|
||||
? ApplicationContext::get(PackageBuilder::class)
|
||||
: null;
|
||||
if ($builder !== null && ($option = $builder->getOption($key)) !== null) {
|
||||
return $option;
|
||||
}
|
||||
return $default;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user