parse.php Windows uses CTRL+Z as a EOF sequence
authorAntoine Musso <hashar@free.fr>
Fri, 6 Jul 2012 18:22:00 +0000 (20:22 +0200)
committerAntoine Musso <hashar@free.fr>
Fri, 6 Jul 2012 18:23:24 +0000 (20:23 +0200)
Follow up:
1fc2bb9 - parse.php note about using ^D to end output

The previous patch assumed ^D to be the standard.

Change-Id: If573c1a03eb9679d74fcb24c1be6931eee361158

maintenance/parse.php

index 15ed5ac..464de10 100644 (file)
@@ -66,7 +66,8 @@ class CLIParser extends Maintenance {
                $input_file = $this->getArg( 0, $php_stdin );
 
                if( $input_file === $php_stdin ) {
-                       $this->error( basename(__FILE__) .": warning: reading wikitext from STDIN. Press CTRL+D to parse.\n" );
+                       $ctrl = wfIsWindows() ? 'CTRL+Z' : 'CTRL+D';
+                       $this->error( basename(__FILE__) .": warning: reading wikitext from STDIN. Press $ctrl to parse.\n" );
                }
 
                return file_get_contents( $input_file );