浏览代码

Make sure config command output is also output on --quiet so that warnings can be hidden, fixes #7963

Jordi Boggiano 6 年之前
父节点
当前提交
94df554255
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      src/Composer/Command/ConfigCommand.php

+ 4 - 3
src/Composer/Command/ConfigCommand.php

@@ -21,6 +21,7 @@ use Symfony\Component\Console\Output\OutputInterface;
 use Composer\Config;
 use Composer\Config;
 use Composer\Config\JsonConfigSource;
 use Composer\Config\JsonConfigSource;
 use Composer\Factory;
 use Composer\Factory;
+use Composer\IO\IOInterface;
 use Composer\Json\JsonFile;
 use Composer\Json\JsonFile;
 use Composer\Semver\VersionParser;
 use Composer\Semver\VersionParser;
 use Composer\Package\BasePackage;
 use Composer\Package\BasePackage;
@@ -284,7 +285,7 @@ EOT
                 $value = json_encode($value);
                 $value = json_encode($value);
             }
             }
 
 
-            $this->getIO()->write($value);
+            $this->getIO()->write($value, true, IOInterface::QUIET);
 
 
             return 0;
             return 0;
         }
         }
@@ -695,9 +696,9 @@ EOT
             }
             }
 
 
             if (is_string($rawVal) && $rawVal != $value) {
             if (is_string($rawVal) && $rawVal != $value) {
-                $io->write('[<comment>' . $k . $key . '</comment>] <info>' . $rawVal . ' (' . $value . ')</info>');
+                $io->write('[<comment>' . $k . $key . '</comment>] <info>' . $rawVal . ' (' . $value . ')</info>', true, IOInterface::QUIET);
             } else {
             } else {
-                $io->write('[<comment>' . $k . $key . '</comment>] <info>' . $value . '</info>');
+                $io->write('[<comment>' . $k . $key . '</comment>] <info>' . $value . '</info>', true, IOInterface::QUIET);
             }
             }
         }
         }
     }
     }