[2.0][DDC-223] Enhanced CLI re-importing the Global Arguments functionality
This commit is contained in:
parent
3ec23c7272
commit
d2b59d7a72
@ -162,11 +162,6 @@ class CliController extends AbstractNamespace
|
||||
$taskName = array_pop($taskPath);
|
||||
$taskNamespace = $this->_retrieveTaskNamespace($taskPath);
|
||||
|
||||
// Merge global configuration if it exists
|
||||
if (($globalArgs = $this->getConfiguration()->getAttribute('globalArguments')) !== null) {
|
||||
$args = array_merge($globalArgs, $args);
|
||||
}
|
||||
|
||||
$taskNamespace->runTask($taskName, $args);
|
||||
}
|
||||
|
||||
|
@ -213,6 +213,12 @@ class TaskNamespace extends AbstractNamespace
|
||||
{
|
||||
try {
|
||||
$task = $this->getTask($name);
|
||||
|
||||
// Merge global configuration if it exists
|
||||
if (($globalArgs = $this->getConfiguration()->getAttribute('globalArguments')) !== null) {
|
||||
$arguments = array_merge($globalArgs, $arguments);
|
||||
}
|
||||
|
||||
$task->setArguments($arguments);
|
||||
|
||||
if ((isset($arguments['help']) && $arguments['help']) || (isset($arguments['h']) && $arguments['h'])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user