And I run `wp <type> path`
And save STDOUT as {CONTENT_DIR}
+ When I try `wp <type> get <item>`
+ Then the return code should be 1
+ And STDERR should not be empty
+
# Install an out of date <item> from WordPress.org repository
When I run `wp <type> install <item> --version=<version>`
Then STDOUT should contain:
*/
public function get( $args, $assoc_args ) {
$file = $this->_parse_name( $args[0] );
+ if ( !$file ) {
+ WP_CLI::error( "The '{$args[0]}' plugin could not be found." );
+ }
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $file, false, false );