Skip to content

curl to post generate gives error: The parameter post_content reads from STDIN #293

@eduardoarandah

Description

@eduardoarandah

Bug Report

Describe the current, buggy behavior

curl -Ns http://loripsum.net/api/5 | wp post generate --post_content --count=10

Gives me:

Error: The parameter post_content reads from STDIN.

Curl works fine:

image

Describe how other contributors can replicate this bug

  • Install wordpress
  • Run command
// You can also use code snippets if needed.

Describe what you would expect as the correct outcome

Generate posts

Let us know what environment you are running this on

OS:     Linux 4.19.84-microsoft-standard #1 SMP Wed Nov 13 11:44:37 UTC 2019 x86_64
Shell:  /usr/bin/zsh
PHP binary:     /usr/bin/php7.3
PHP version:    7.3.15-1+ubuntu18.04.1+deb.sury.org+1
php.ini used:   /etc/php/7.3/cli/php.ini
WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       /home/lalo/www/bedrock
WP-CLI packages dir:    /home/lalo/.wp-cli/packages/
WP-CLI global config:
WP-CLI project config:  /home/lalo/www/bedrock/wp-cli.yml
WP-CLI version: 2.4.0

Provide a possible solution

If you happen to have a suggestion on how to fix this bug, please tell us in here.

Just leave this section out if you don't know how to fix it.

Provide additional context/Screenshots

this works:

echo "hello world" | wp post generate --post_content --count=10

image

This works:

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions