Commit d2b59d7a authored by guilhermeblanco's avatar guilhermeblanco

[2.0][DDC-223] Enhanced CLI re-importing the Global Arguments functionality

parent 3ec23c72
......@@ -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'])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment