OSDN Git Service

Restore the use of `--prompt` as a runtime argument.
authorDaniel Bachhuber <d@danielbachhuber.com>
Wed, 20 Nov 2013 22:19:27 +0000 (14:19 -0800)
committerDaniel Bachhuber <d@danielbachhuber.com>
Wed, 20 Nov 2013 22:19:27 +0000 (14:19 -0800)
The argument is unique of it's kind, and there isn't a great way of doing this otherwise.

php/WP_CLI/Runner.php

index e09a54a..4893ded 100644 (file)
@@ -394,6 +394,10 @@ class Runner {
                $configurator->merge_config( $runtime_config );
                $this->config = $configurator->to_array();
 
+               // --prompt can't be set in file, but is still a valid runtime arg
+               if ( ! empty( $runtime_config['prompt'] ) )
+                       $this->config['prompt'] = true;
+
                if ( !isset( $this->config['path'] ) ) {
                        $this->config['path'] = dirname( Utils\find_file_upward( 'wp-load.php' ) );
                }