浏览代码

Merge pull request #1872 from pborreli/patch-4

Don't throw an update warning when using selfupdate alias
Jordi Boggiano 12 年之前
父节点
当前提交
82fc3b3eb3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Console/Application.php

+ 1 - 1
src/Composer/Console/Application.php

@@ -94,7 +94,7 @@ class Application extends BaseApplication
             $output->writeln('<warning>Composer only officially supports PHP 5.3.2 and above, you will most likely encounter problems with your PHP '.PHP_VERSION.', upgrading is strongly recommended.</warning>');
             $output->writeln('<warning>Composer only officially supports PHP 5.3.2 and above, you will most likely encounter problems with your PHP '.PHP_VERSION.', upgrading is strongly recommended.</warning>');
         }
         }
 
 
-        if (defined('COMPOSER_DEV_WARNING_TIME') && $this->getCommandName($input) !== 'self-update') {
+        if (defined('COMPOSER_DEV_WARNING_TIME') && $this->getCommandName($input) !== 'self-update' && $this->getCommandName($input) !== 'selfupdate') {
             if (time() > COMPOSER_DEV_WARNING_TIME) {
             if (time() > COMPOSER_DEV_WARNING_TIME) {
                 $output->writeln(sprintf('<warning>Warning: This development build of composer is over 30 days old. It is recommended to update it by running "%s self-update" to get the latest version.</warning>', $_SERVER['PHP_SELF']));
                 $output->writeln(sprintf('<warning>Warning: This development build of composer is over 30 days old. It is recommended to update it by running "%s self-update" to get the latest version.</warning>', $_SERVER['PHP_SELF']));
             }
             }