8000 Not styling when raw output is requested · symfony/symfony@06f75bb · GitHub
[go: up one dir, main page]

Skip to content

Commit 06f75bb

Browse files
committed
Not styling when raw output is requested
1 parent 8acbc2d commit 06f75bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,10 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o
219219

220220
$tableHeaders = array_merge(array('Service ID'), $tagsNames, array('Class name'));
221221
$tableRows = array();
222+
$rawOutput = isset($options['raw_output']) && $options['raw_output'];
222223
foreach ($this->sortServiceIds($serviceIds) as $serviceId) {
223224
$definition = $this->resolveServiceDefinition($builder, $serviceId);
224-
$styledServiceId = sprintf('<fg=cyan>%s</fg=cyan>', $serviceId);
225+
$styledServiceId = $rawOutput ? $serviceId : sprintf('<fg=cyan>%s</fg=cyan>', $serviceId);
225226
if ($definition instanceof Definition) {
226227
if ($showTag) {
227228
foreach ($definition->getTag($showTag) as $key => $tag) {

0 commit comments

Comments
 (0)
0