Skip to content

Commit

Permalink
Calling commands rather than adding to queue (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgrayston authored and jmolivas committed Apr 10, 2017
1 parent 15b5f71 commit 3895bd3
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/Command/Chain/ChainCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Dflydev\PlaceholderResolver\RegexPlaceholderResolver;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Filesystem\Filesystem;
Expand Down Expand Up @@ -312,12 +313,20 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
}

$this->chainQueue->addCommand(
$command['command'],
$moduleInputs,
$interactive,
$learning
);
$application = $this->getApplication();
$callCommand = $application->find($command['command']);

if (!$callCommand) {
continue;
}

$input = new ArrayInput($moduleInputs);
if (!is_null($interactive)) {
$input->setInteractive($interactive);
}

$io->text($command['command']);
$callCommand->run($input, $io);
}

return 0;
Expand Down

0 comments on commit 3895bd3

Please sign in to comment.