Skip to content

Conversation

@Mte90
Copy link
Contributor

@Mte90 Mte90 commented Jul 20, 2018

Closes #175

@Mte90
Copy link
Contributor Author

Mte90 commented Jul 20, 2018

Again I am not sure if needs behat tests :-)

@Mte90
Copy link
Contributor Author

Mte90 commented Jul 20, 2018

This seems that is working without any issues and the tests confirm.

@schlessera schlessera added the command:post-generate Related to 'post generate' command label Dec 3, 2018
@schlessera
Copy link
Member

I do have trouble getting this to test properly. The has_stdin() code behaves differently within Behat than it does when directly used in a shell.

@schlessera schlessera changed the title Detect post_content if stdin Check for STDIN if --post_content is used Apr 20, 2019
@schlessera schlessera added this to the 2.0.3 milestone Apr 20, 2019
@Mte90 Mte90 requested a review from a team as a code owner April 20, 2019 12:32
@schlessera
Copy link
Member

The code you wrote works, but the has_stdin() method is currently broken for some edge cases (one of them being Behat tests).

Related:

I'll merge this for now, but mark the Behat as @broken, as I still think it is an improvement either way.

@schlessera schlessera merged commit 65181e5 into wp-cli:master Apr 20, 2019
@schlessera
Copy link
Member

Thanks for the PR, @Mte90 , as well as for your patience! ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:post-generate Related to 'post generate' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wp post generate --post_content hangs if there's no STDIN

2 participants