Skip to content

Commit f969a17

Browse files
committed
[issue #38758] Area code parameter for dev:di:info CLI command ( fixes )
1 parent b3804fa commit f969a17

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/code/Magento/Developer/Console/Command/DiInfoCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\Console\Input\InputArgument;
1616
use Symfony\Component\Console\Helper\Table;
1717
use Magento\Framework\App\AreaList;
18+
use Magento\Framework\App\Area;
1819

1920
class DiInfoCommand extends Command
2021
{
@@ -159,8 +160,8 @@ private function printPlugins($className, $output, $label)
159160
*/
160161
protected function execute(InputInterface $input, OutputInterface $output)
161162
{
162-
$area = 'GLOBAL';
163-
if ($area = $input->getArgument(self::AREA_CODE)) {
163+
$area = $input->getArgument(self::AREA_CODE) ?? Area::AREA_GLOBAL;
164+
if ($area !== Area::AREA_GLOBAL) {
164165
$this->setDiArea($area);
165166
}
166167
$className = $input->getArgument(self::CLASS_NAME);

0 commit comments

Comments
 (0)