Skip to content

Commit

Permalink
fix: Strip trailing newline from python output (#1212)
Browse files Browse the repository at this point in the history
This is used to generate a path, which shouldn't have a trailing
newline.
  • Loading branch information
illicitonion committed May 8, 2023
1 parent 23cf6b6 commit 799e63f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/pip_install/pip_repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def _get_toolchain_unix_cflags(rctx):
er = rctx.execute([
rctx.path(rctx.attr.python_interpreter_target).realpath,
"-c",
"import sys; print(f'{sys.version_info[0]}.{sys.version_info[1]}')",
"import sys; print(f'{sys.version_info[0]}.{sys.version_info[1]}', end='')",
])
if er.return_code != 0:
fail("could not get python version from interpreter (status {}): {}".format(er.return_code, er.stderr))
Expand Down

0 comments on commit 799e63f

Please sign in to comment.