fix wp-cli/wp-cli#1036
Merge pull request #1101 from nyordanov/fix-1036

Fix issue #1036