OSDN Git Service

Fix error output if no WordPress install exists
authorDominik Schilling <dominikschilling+git@gmail.com>
Sun, 10 Feb 2013 10:53:33 +0000 (11:53 +0100)
committerDominik Schilling <dominikschilling+git@gmail.com>
Sun, 10 Feb 2013 10:53:33 +0000 (11:53 +0100)
php/WP_CLI/Runner.php

index 7dbd863..1daa7ef 100644 (file)
@@ -233,9 +233,9 @@ class Runner {
                }
 
                if ( !is_readable( ABSPATH . 'wp-load.php' ) ) {
-                       WP_CLI::error( "This does not seem to be a WordPress install.", false );
-                       WP_CLI::line( "Pass --path=`path/to/wordpress` or run `wp core download`." );
-                       exit(1);
+                       WP_CLI::error(
+                               "This does not seem to be a WordPress install.\n" .
+                               "Pass --path=`path/to/wordpress` or run `wp core download`." );
                }
 
                if ( array( 'core', 'config' ) == $this->arguments ) {
@@ -310,4 +310,3 @@ class Runner {
                WP_CLI::run_command( $this->arguments, $this->assoc_args );
        }
 }
-