fixed version output for show command
parent
c5f3a6febd
commit
f748fb1953
|
@ -258,13 +258,19 @@ EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
uasort($versions, 'version_compare');
|
uasort($versions, 'version_compare');
|
||||||
$versions = implode(', ', array_keys(array_reverse($versions)));
|
$versions = array_keys(array_reverse($versions));
|
||||||
|
|
||||||
// highlight installed version
|
// highlight installed version
|
||||||
if ($installedRepo->hasPackage($package)) {
|
if ($installedRepo->hasPackage($package)) {
|
||||||
$versions = str_replace($package->getPrettyVersion(), '<info>* ' . $package->getPrettyVersion() . '</info>', $versions);
|
$installedVersion = $package->getPrettyVersion();
|
||||||
|
$key = array_search($installedVersion, $versions);
|
||||||
|
if (FALSE !== $key) {
|
||||||
|
$versions[$key] = '<info>* ' . $installedVersion . '</info>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$versions = implode(', ', $versions);
|
||||||
|
|
||||||
$output->writeln('<info>versions</info> : ' . $versions);
|
$output->writeln('<info>versions</info> : ' . $versions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue