Skip to content

Commit 40de429

Browse files
ro0NLnicolas-grekas
authored andcommitted
[FrameworkBundle] Expose share directory in AboutCommand
1 parent e35a256 commit 40de429

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5858
$buildDir = $kernel->getCacheDir();
5959
}
6060

61+
if (method_exists($kernel, 'getShareDir')) {
62+
$shareDir = $kernel->getShareDir();
63+
} else {
64+
$shareDir = $kernel->getCacheDir();
65+
}
66+
6167
$xdebugMode = getenv('XDEBUG_MODE') ?: \ini_get('xdebug.mode');
6268

6369
$rows = [
@@ -76,6 +82,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7682
['Charset', $kernel->getCharset()],
7783
['Cache directory', self::formatPath($kernel->getCacheDir(), $kernel->getProjectDir()).' (<comment>'.self::formatFileSize($kernel->getCacheDir()).'</>)'],
7884
['Build directory', self::formatPath($buildDir, $kernel->getProjectDir()).' (<comment>'.self::formatFileSize($buildDir).'</>)'],
85+
['Share directory', self::formatPath($shareDir, $kernel->getProjectDir()).' (<comment>'.self::formatFileSize($shareDir).'</>)'],
7986
['Log directory', self::formatPath($kernel->getLogDir(), $kernel->getProjectDir()).' (<comment>'.self::formatFileSize($kernel->getLogDir()).'</>)'],
8087
new TableSeparator(),
8188
['<info>PHP</>'],

0 commit comments

Comments
 (0)