Skip to content

Commit

Permalink
Merge pull request #43 from itkg-canne/fix-command-env
Browse files Browse the repository at this point in the history
[BUGFIX] Fix env definition for process event command call.
  • Loading branch information
pdenis committed Feb 27, 2017
2 parents dbf20e0 + b765cfa commit dd4285d
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions Command/ProcessDynamicChannelCommand.php
Expand Up @@ -3,7 +3,6 @@
namespace Itkg\DelayEventBundle\Command;

use Itkg\DelayEventBundle\Handler\LockHandlerInterface;
use Itkg\DelayEventBundle\Model\Event;
use Itkg\DelayEventBundle\Model\Lock;
use Itkg\DelayEventBundle\Processor\EventProcessor;
use Itkg\DelayEventBundle\Repository\EventRepository;
Expand Down Expand Up @@ -165,7 +164,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$process = new \Symfony\Component\Process\Process(
sprintf(
$commandline,
$this->getEnv($input),
$this->getContainer()->getParameter('kernel.environment'),
$channel,
$identifier
)
Expand Down Expand Up @@ -198,16 +197,6 @@ private function getWorkingDir()
return $this->getContainer()->get('kernel')->getRootDir();
}

/**
* @param InputInterface $input
*
* @return string
*/
private function getEnv(InputInterface $input)
{
return $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
}

/**
* @return string
*/
Expand Down

0 comments on commit dd4285d

Please sign in to comment.