Skip to content

Commit ee820cd

Browse files
committed
Merge branch 'fix-cli'
2 parents e7f85be + b82cdaa commit ee820cd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Cli/CliCommand.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,6 @@ final public function __clone()
243243
$this->PositionalOptions = [];
244244
$this->SchemaOptions = [];
245245
$this->DeferredOptionErrors = [];
246-
247-
$this->loadOptions();
248246
}
249247

250248
/**
@@ -764,7 +762,7 @@ final protected function applyOptionValues(
764762
bool $schema = false,
765763
bool $asArguments = false
766764
): array {
767-
$this->assertHasRun();
765+
$this->assertHasRun()->loadOptions();
768766
if ($schema) {
769767
if ($normalise) {
770768
$values = $this->filterNormaliseSchemaValues($values);
@@ -829,7 +827,7 @@ final protected function getOptionValues(
829827
bool $export = false,
830828
bool $schema = false
831829
): array {
832-
$this->assertHasRun();
830+
$this->assertHasRun()->loadOptions();
833831
$options = $schema ? $this->SchemaOptions : $this->Options;
834832
foreach ($options as $key => $option) {
835833
if ($export && !array_key_exists($option->Key, $this->ArgumentValues)) {
@@ -886,7 +884,7 @@ final protected function getDefaultOptionValues(bool $schema = false): array
886884
*/
887885
final protected function getOptionValue(string $name)
888886
{
889-
$this->assertHasRun();
887+
$this->assertHasRun()->loadOptions();
890888
$option = $this->_getOption($name, false);
891889
return $this->OptionValues[$option->Key] ?? null;
892890
}

0 commit comments

Comments
 (0)