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

theme path --dir returns path with line endings #179

Closed
quinncomendant opened this issue May 24, 2019 · 1 comment
Closed

theme path --dir returns path with line endings #179

quinncomendant opened this issue May 24, 2019 · 1 comment

Comments

@quinncomendant
Copy link

quinncomendant commented May 24, 2019

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.

@danielbachhuber
Copy link
Member

Glad you were able to figure this out!

But still, it would be nice if wp-cli could correct for this issue by trimming whitespace before outputting a value.

Yeah, it would be nice. It'd be a fair amount of engineering effort, relatively brittle, etc., so we probably won't implement it.

@danielbachhuber danielbachhuber closed this as not planned Won't fix, can't repro, duplicate, stale Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants