Conan: output is not saved when using self.run() with win_bash=True

Created on 26 Aug 2019  路  6Comments  路  Source: conan-io/conan

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())

  • [x] I've read the CONTRIBUTING guide.
  • [x] I've specified the Conan version, operating system version and any tool that can be relevant.
  • [x] I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.
low good first issue low review feature

Most helpful comment

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

All 6 comments

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

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

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

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

Could you invite me to the cpplang workspace? My email is [email protected]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zlalanne picture zlalanne  路  3Comments

bobeff picture bobeff  路  3Comments

Polibif picture Polibif  路  3Comments

rconde01 picture rconde01  路  3Comments

mpdelbuono picture mpdelbuono  路  3Comments