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

output is not saved when using self.run() with win_bash=True #5670

Closed
3 tasks done
zlalanne opened this issue Aug 26, 2019 · 7 comments
Closed
3 tasks done

output is not saved when using self.run() with win_bash=True #5670

zlalanne opened this issue Aug 26, 2019 · 7 comments

Comments

@zlalanne
Copy link

zlalanne commented Aug 26, 2019

To help us debug your issue please explain:

Using Conan version 1.18.1 on Windows. Running conan from the git bash shell that comes with the Windows git installation.

I'm packaging up some tools to use in our Conan infrastructure. As part of our test_package I like to run the tool to just verify the tool was added to the PATH correctly and can be run. One test I do is run a tool with --version to check that the version packaged was the one intended.

What I'm having trouble with is conan doesn't seem to capture STDOUT when callign tools using self.run() when win_bash=True).

So something like this doesn't actually work:

buffer = StringIO()
self.run("ls --version", output=buffer, win_bash=True)

# This does not print anything. STDOUT was not captured.
print("My output was:")
print(buffer.getvalue())
  • I've read the CONTRIBUTING guide.
  • I've specified the Conan version, operating system version and any tool that can be relevant.
  • I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.
@jgsogo
Copy link
Contributor

jgsogo commented Aug 28, 2019

You are right, it is actually written in the sources as a FIXME 😓

# FIXME: run in windows bash is not using output

@nicememory
Copy link
Contributor

That's interesting. I'll invetigate on this FIXME.

@jgsogo
Copy link
Contributor

jgsogo commented Sep 2, 2019

Thanks @nicememory, if you need any help, just tell us. And fee free to reach us in slack too 😊

@nicememory
Copy link
Contributor

I haven't used slack, how to use it?

@jgsogo
Copy link
Contributor

jgsogo commented Sep 3, 2019

Slack is an application like the old IRC, there is one C++ community with people all over the world (http://cpplang.slack.com) with many channels to talk about different C++ topics. There is one channel dedicated to #conan where you can share your experience, ask for help,... See you there! ;D

@nicememory
Copy link
Contributor

Could you invite me to the cpplang workspace? My email is nicememory@gmail.com

@memsharded
Copy link
Member

Closing this ticket as outdated, the output system has been fully revamped in Conan 2.0, please create new tickets if necessary, thanks!

@memsharded memsharded closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment