wp-cli / config-command

Generates and reads the wp-config.php file.
MIT License
38 stars 36 forks source link

wp config [any command] puts a newline between each line in my wp-config.php files #119

Closed michacassola closed 1 year ago

michacassola commented 3 years ago

wp config [any command] puts a newline between each line in my wp-config.php files

I install WP-CLI as follows because all WordPress folders are owned by www-data:

sudo wget -qO /usr/local/bin/wp-cli https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
sudo chmod +x /usr/local/bin/wp-cli
sudo tee /usr/local/bin/wp >/dev/null <<'EOF'
sudo runuser -u www-data -- wp-cli $@
EOF
sudo chmod +x /usr/local/bin/wp

Both wrapper commands sudo runuser -u www-data -- wp-cli $@ and sudo -u www-data -- wp-cli $@ do this. sudo -u www-data -i -- wp-cli $@ gives me this output: This account is currently not available.

The commands I ran so far that put a newline between each line in wp-config.php are:

wp --path=/var/www/$domain/htdocs config shuffle-salts
wp --path=/var/www/$domain/htdocs config set CLOUDFLARE_HTTP2_SERVER_PUSH_ACTIVE true

I think it is a bug? Any help will be appreciated! Thanks in advance!

danielbachhuber commented 1 year ago

Thanks for the report, @michacassola.

This looks like a duplicate of https://github.com/wp-cli/config-command/issues/160. Closing in favor of that issue.

michacassola commented 1 year ago

@danielbachhuber 160 comes after 119. 160 is the duplicate.

michacassola commented 1 year ago

Also this was posted nearly 3 years ago. I guess I won't be reporting any issues in this project because it seems to be useless!