Skip to content

Commit

Permalink
League\Container\ContainerAwareTrait::getContainer() uses execeptions…
Browse files Browse the repository at this point in the history
… now.
  • Loading branch information
joeparsons committed Sep 14, 2020
1 parent 925b0e1 commit 2307735
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Robo\Exception\TaskExitException;
use League\Container\ContainerAwareInterface;
use League\Container\ContainerAwareTrait;
use League\Container\Exception\ContainerException;
use Consolidation\Config\Util\EnvConfig;
use Symfony\Component\Console\Output\NullOutput;

Expand Down Expand Up @@ -242,7 +243,9 @@ public function run($input = null, $output = null, $app = null, $commandFiles =
$this->setOutput($output);

// If we were not provided a container, then create one
if (!$this->getContainer()) {
try {
$this->getContainer();
} catch (ContainerException $e) {
$configFiles = $this->getConfigFilePaths($this->configFilename);
$config = Robo::createConfiguration($configFiles);
if ($this->envConfigPrefix) {
Expand Down

0 comments on commit 2307735

Please sign in to comment.