Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CommandRendererBackground.php
Go to the documentation of this file.
1 <?php
7 
9 
11 {
15  protected $osInfo;
16 
20  public function __construct(OsInfo $osInfo)
21  {
22  $this->osInfo = $osInfo;
23  }
24 
32  public function render($command, array $arguments = [])
33  {
34  $command = parent::render($command, $arguments);
35 
36  return $this->osInfo->isWindows() ?
37  'start /B "magento background task" ' . $command
38  : str_replace('2>&1', '> /dev/null &', $command);
39  }
40 }
$arguments