mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 15:02:47 +08:00
修正命令行hasOption方法
This commit is contained in:
@@ -361,7 +361,7 @@ class Input
|
|||||||
}
|
}
|
||||||
|
|
||||||
return isset($this->arguments[$name]) ? $this->arguments[$name] : $this->definition->getArgument($name)
|
return isset($this->arguments[$name]) ? $this->arguments[$name] : $this->definition->getArgument($name)
|
||||||
->getDefault();
|
->getDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -435,7 +435,7 @@ class Input
|
|||||||
*/
|
*/
|
||||||
public function hasOption($name)
|
public function hasOption($name)
|
||||||
{
|
{
|
||||||
return $this->definition->hasOption($name);
|
return $this->definition->hasOption($name) && isset($this->options[$name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -24,8 +24,10 @@ class Build extends Command
|
|||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
$this->setName('build')
|
$this->setName('build')
|
||||||
->setDefinition([new Option('config', null, Option::VALUE_OPTIONAL, "build.php path")])
|
->setDefinition([
|
||||||
->setDefinition([new Option('module', null, Option::VALUE_OPTIONAL, "module name")])
|
new Option('config', null, Option::VALUE_OPTIONAL, "build.php path"),
|
||||||
|
new Option('module', null, Option::VALUE_OPTIONAL, "module name")
|
||||||
|
])
|
||||||
->setDescription('Build Application Dirs');
|
->setDescription('Build Application Dirs');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user