extension-command
extension-command copied to clipboard
`theme path --dir` returns path with line endings
I have one WP site (out of many) for which the wp theme path --dir command returns a path name prefixed with line feeds, like this: \r\n\r\n/home/fox/www.graphicfox.com/html/wp-content.
Primary, this is a feature request: I expect the values returned to be stripped of leading and trailing whitespace.
~~Secondly, I would appreciate some help: can anyone tell me how wp-cli gets the theme path value? I'd like to discover why this site is returning a path with line endings.~~ 😓
Update: I found the extra line endings are coming from a plugin or theme file, because they appear if I do something as simple as this:
php -r "include '/path/to/wp-config.php';"
And a couple linefeeds are printed. Sigh.
But still, it would be nice if wp-cli could correct for this issue by trimming whitespace before outputting a value.