Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion features/user-import-csv.feature
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ Feature: Import users from CSV
| Bob Jones | contributor |
| Bill Jones | administrator,author |

@broken
Scenario: Importing users from STDIN
Given a WP install
And a users.csv file:
Expand Down
4 changes: 4 additions & 0 deletions src/User_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,10 @@ public function import_csv( $args, $assoc_args ) {

$csv_data[] = $data;
}

if ( empty( $indexes ) && empty( $csv_data ) ) {
WP_CLI::error( 'Unable to read content from STDIN.' );
}
} else {
$csv_data = new CsvIterator( $filename );
}
Expand Down
Loading