OSDN Git Service

Rename --allow_root to --allow-root
authorWesley Spikes <wesley.spikes@gmail.com>
Wed, 22 Jan 2014 18:38:35 +0000 (10:38 -0800)
committerWesley Spikes <wesley.spikes@gmail.com>
Wed, 22 Jan 2014 18:38:35 +0000 (10:38 -0800)
php/WP_CLI/Runner.php
php/config-spec.php

index c14bdb0..acb95aa 100644 (file)
@@ -397,7 +397,7 @@ class Runner {
        }
 
        private function check_root() {
-               if ( $this->config['allow_root'] )
+               if ( $this->config['allow-root'] )
                        return; # they're aware of the risks!
                if ( !function_exists( 'posix_geteuid') )
                        return; # posix functions not available
@@ -413,7 +413,7 @@ class Runner {
                        "your server, making it quite DANGEROUS.\n" .
                        "\n" .
                        "If you'd like to continue as root, please run this again, adding this " .
-                       "flag:  --allow_root\n" .
+                       "flag:  --allow-root\n" .
                        "\n" .
                        "If you'd like to run it as the user that this site is under, you can " .
                        "run the following to become the respective user:\n" .
index e052609..ffddb17 100644 (file)
@@ -77,8 +77,8 @@ return array(
                'default' => array(),
        ),
 
-       'allow_root' => array(
-               'runtime' => '=<allow_root>',
+       'allow-root' => array(
+               'runtime' => '=<allow-root>',
                'desc' => '(NOT RECCOMENDED) Allow wp-cli to run as root. This poses a security risk, so you probably do not want to do this.',
        ),