Skip to content

Commit 987fbae

Browse files
author
Amrouche Hamza
committed
[FrameworkBundle] Fix a bug where a color tag will be shown when passing an antislash
1 parent f056b4e commit 987fbae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o
226226
$rawOutput = isset($options['raw_text']) && $options['raw_text'];
227227
foreach ($this->sortServiceIds($serviceIds) as $serviceId) {
228228
$definition = $this->resolveServiceDefinition($builder, $serviceId);
229+
if ('\\' === substr($serviceId, -1)) {
230+
$serviceId = substr($serviceId, 0, -1);
231+
}
229232
$styledServiceId = $rawOutput ? $serviceId : sprintf('<fg=cyan>%s</fg=cyan>', $serviceId);
230233
if ($definition instanceof Definition) {
231234
if ($showTag) {

0 commit comments

Comments
 (0)