Suppress stdin warning with --quiet
authorArlo Breault <abreault@wikimedia.org>
Mon, 20 Jul 2015 20:22:24 +0000 (13:22 -0700)
committerArlo Breault <abreault@wikimedia.org>
Fri, 24 Jul 2015 04:42:55 +0000 (21:42 -0700)
Change-Id: I789260be1c83e0f081e6b7cd84cdab291d07837e

maintenance/parse.php

index 7b05cb7..d655965 100644 (file)
@@ -89,11 +89,10 @@ class CLIParser extends Maintenance {
         * @return string Wikitext
         */
        protected function Wikitext() {
-
                $php_stdin = 'php://stdin';
                $input_file = $this->getArg( 0, $php_stdin );
 
-               if ( $input_file === $php_stdin ) {
+               if ( $input_file === $php_stdin && !$this->mQuiet ) {
                        $ctrl = wfIsWindows() ? 'CTRL+Z' : 'CTRL+D';
                        $this->error( basename( __FILE__ )
                                . ": warning: reading wikitext from STDIN. Press $ctrl to parse.\n" );