mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-20 23:35:37 +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)) {
|
if ($input !== null && $input->hasOption($key)) {
|
||||||
return $input->getOption($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;
|
return $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user