/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Shell/CommandRendererBackground.php
40 строк
857 B
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2014 Adobe * All Rights Reserved. */ namespace Magento\Framework\Shell; use Magento\Framework\OsInfo; class CommandRendererBackground extends CommandRenderer { /** * @var \Magento\Framework\OsInfo */ protected $osInfo; /** * @param OsInfo $osInfo */ public function __construct(OsInfo $osInfo) { $this->osInfo = $osInfo; } /** * Render command with arguments * * @param string $command * @param array $arguments * @return string */ public function render($command, array $arguments = []) { $command = parent::render($command, $arguments); return $this->osInfo->isWindows() ? 'start /B "magento background task" ' . $command : str_replace('2>&1', '2>/dev/null >/dev/null &', $command); } }