Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for `STDIN` if `--post_content` is used #189

Merged
merged 5 commits into from Apr 20, 2019

Conversation

@Mte90
Copy link
Contributor

commented Jul 20, 2018

Closes #175

@Mte90

This comment has been minimized.

Copy link
Contributor Author

commented Jul 20, 2018

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

@Mte90

This comment has been minimized.

Copy link
Contributor Author

commented Jul 20, 2018

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

schlessera added some commits Dec 3, 2018

@schlessera

This comment has been minimized.

Copy link
Member

commented Dec 18, 2018

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 wp-cli/committers as a code owner Apr 20, 2019

@schlessera

This comment has been minimized.

Copy link
Member

commented Apr 20, 2019

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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@schlessera

This comment has been minimized.

Copy link
Member

commented Apr 20, 2019

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
2 participants
You can’t perform that action at this time.