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

Describe output parameter in run_in_windows_bash #2543

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion reference/tools.rst
Expand Up @@ -897,7 +897,7 @@ tools.run_in_windows_bash()

.. code-block:: python

def run_in_windows_bash(conanfile, bashcmd, cwd=None, subsystem=None, msys_mingw=True, env=None, with_login=True)
def run_in_windows_bash(conanfile, bashcmd, cwd=None, subsystem=None, msys_mingw=True, env=None, with_login=True, output=True)

Runs a UNIX command inside a bash shell. It requires to have "bash" in the path.
Useful to build libraries using ``configure`` and ``make`` in Windows. Check :ref:`Windows subsytems <windows_subsystems>` section.
Expand All @@ -924,6 +924,15 @@ Parameters:
will have more priority than others.
- **with_login** (Optional, Defaulted to ``True``): Pass the ``--login`` flag to :command:`bash` command. This might come handy when you
don't want to create a fresh user session for running the command.
- **output** (Optional, Defaulted to ``True``): When True it will write in stdout. You can pass any stream that accepts a ``write``
method like a ``six.StringIO()``:

.. code-block:: python

from six import StringIO # Python 2 and 3 compatible
mybuf = StringIO()
tools.run_in_windows_bash(self, "mycommand", output=mybuf)
self.output.warn(mybuf.getvalue())

.. _tools_get_cased_path:

Expand Down