Skip to content

Commit

Permalink
Capture stderr because some runners print their version there
Browse files Browse the repository at this point in the history
  • Loading branch information
eldipa committed Feb 24, 2022
1 parent 292817a commit 6efe029
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion byexample/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,10 @@ def _get_version(self, options):
return None

try:
out = subprocess.check_output(cmd).decode(self.encoding)
out = subprocess.check_output(cmd,
stderr=subprocess.STDOUT).decode(
self.encoding
)
version = self._parse_version(out)

except Exception as err:
Expand Down
3 changes: 1 addition & 2 deletions docs/overview/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,9 @@ If you want to know the exact command line used by `byexample`, you can
find it adding more verbosity:

```shell
$ byexample -l python -x-shebang 'python:env python99' -v test/ds/db-stock-model # byexample: +norm-ws
$ byexample -l python -x-shebang 'python:env python99' -v test/ds/db-stock-model # byexample: +norm-ws +diff=ndiff
[i] Initializing Python Runner
[i] Spawn command line: env python99
<...>
[w] Failed to obtain Python Runner's version <...>
[w] Initialization of Python Runner failed.
<...>
Expand Down

0 comments on commit 6efe029

Please sign in to comment.