OSDN Git Service

make `wp core is-installed` exit with 1 when run against a multisite
authorscribu <mail@scribu.net>
Tue, 17 Dec 2013 23:23:39 +0000 (01:23 +0200)
committerscribu <mail@scribu.net>
Sun, 5 Jan 2014 06:10:39 +0000 (08:10 +0200)
install with no database

features/core.feature
php/WP_CLI/Runner.php

index 59c78a4..5f41b24 100644 (file)
@@ -195,6 +195,9 @@ Feature: Manage WordPress installation
     Given a WP multisite install
     And I run `wp db reset --yes`
 
+    When I try `wp core is-installed`
+    Then the return code should be 1
+
     When I run `wp core multisite-install --title=Test --admin_user=wpcli --admin_email=admin@example.com --admin_password=1`
     Then STDOUT should not be empty
 
index b7d3959..9033d4c 100644 (file)
@@ -466,7 +466,7 @@ class Runner {
                if (
                        count( $this->arguments ) >= 2 &&
                        $this->arguments[0] == 'core' &&
-                       in_array( $this->arguments[1], array( 'install', 'multisite-install' ) )
+                       in_array( $this->arguments[1], array( 'install', 'multisite-install', 'is-installed' ) )
                ) {
                        define( 'WP_INSTALLING', true );