Browse Source

changed the default version if nothing is provided by the developer

Fabien Potencier 15 years ago
parent
commit
1e3e8c760e
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/Symfony/Components/CLI/Application.php

+ 8 - 1
src/Symfony/Components/CLI/Application.php

@@ -304,7 +304,14 @@ class Application
    */
   public function getLongVersion()
   {
-    return sprintf('<info>%s</info> version <comment>%s</comment>', $this->getName(), $this->getVersion());
+    if ('UNKNOWN' !== $this->getName() && 'UNKNOWN' !== $this->getVersion())
+    {
+      return sprintf('<info>%s</info> version <comment>%s</comment>', $this->getName(), $this->getVersion());
+    }
+    else
+    {
+      return '<info>CLI Tool</info>';
+    }
   }
 
   /**