diff --git a/features/media-import.feature b/features/media-import.feature index 660f63cb..1c800f26 100644 --- a/features/media-import.feature +++ b/features/media-import.feature @@ -284,7 +284,8 @@ Feature: Manage WordPress attachments When I try `wp media import 'http://wp-cli.github.io/behat-data/codeispoetry.png' --porcelain=invalid` Then STDERR should be: """ - Error: Invalid value for : invalid. Expected flag or 'url'. + Error: Parameter errors: + Invalid value specified for 'porcelain' (Output a single field for each imported image. Defaults to attachment ID when used as flag.) """ Scenario: Import media from STDIN diff --git a/src/Media_Command.php b/src/Media_Command.php index aab554ae..6f95308c 100644 --- a/src/Media_Command.php +++ b/src/Media_Command.php @@ -501,9 +501,6 @@ public function import( $args, $assoc_args = array() ) { } $porcelain = Utils\get_flag_value( $assoc_args, 'porcelain' ); - if ( is_string( $porcelain ) && ! in_array( $porcelain, array( 'url' ), true ) ) { - WP_CLI::error( sprintf( 'Invalid value for : %s. Expected flag or \'url\'.', $porcelain ) ); - } if ( isset( $assoc_args['post_id'] ) ) { if ( ! get_post( $assoc_args['post_id'] ) ) {