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

[feature] Redirect stderr from pkg-config in PkgConfig #17013

Closed
1 task done
cubanpit opened this issue Sep 18, 2024 · 2 comments · Fixed by #17020
Closed
1 task done

[feature] Redirect stderr from pkg-config in PkgConfig #17013

cubanpit opened this issue Sep 18, 2024 · 2 comments · Fixed by #17020
Assignees
Milestone

Comments

@cubanpit
Copy link

What is your suggestion?

In PkgConfig tool there is the _parse_output method which executes pkg-config, it redirects the stdout but leaves the stderr stream to the terminal.
When using PkgConfig and catching the ConanException we end up having stderr in the terminal, which is not desirable.
I would propose to redirect stderr as well in run(), save it and print it as part of the exception message in fill_cpp_info().

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@memsharded
Copy link
Member

Thanks for your suggestion @cubanpit

I think it makes sense, I am proposing PR #17020 to implement this (together with some extended cmd, stdout and stderr reporting if the exception is raised)

@memsharded memsharded added this to the 2.8.0 milestone Sep 22, 2024
@memsharded
Copy link
Member

#17020 was merged, so this will be in next Conan 2.8, thanks again for the feedback.

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

Successfully merging a pull request may close this issue.

2 participants