Skip to content

Commit 56eb96d

Browse files
polcfabpot
authored andcommitted
[Console] Display console application name even when no version set
1 parent e17d1ec commit 56eb96d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Application.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,12 @@ public function setVersion($version)
322322
*/
323323
public function getLongVersion()
324324
{
325-
if ('UNKNOWN' !== $this->getName() && 'UNKNOWN' !== $this->getVersion()) {
326-
return sprintf('<info>%s</info> version <comment>%s</comment>', $this->getName(), $this->getVersion());
325+
if ('UNKNOWN' !== $this->getName()) {
326+
if ('UNKNOWN' !== $this->getVersion()) {
327+
return sprintf('<info>%s</info> version <comment>%s</comment>', $this->getName(), $this->getVersion());
328+
}
329+
330+
return sprintf('<info>%s</info>', $this->getName());
327331
}
328332

329333
return '<info>Console Tool</info>';

0 commit comments

Comments
 (0)