Skip to content

Commit 92c075a

Browse files
committed
$ workaround
1 parent c8ba053 commit 92c075a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/conftest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ def ruby(request: pytest.FixtureRequest) -> Optional[str]:
2020
"""Fixture to get the ruby executable from the command line options"""
2121
ruby = request.config.getoption("--ruby", None)
2222
assert isinstance(ruby, (str, type(None))), f"Invalid ruby option: {ruby}"
23-
return ruby
23+
if isinstance(ruby, str):
24+
# we need to prepend the path with some garbage to make it not a valid
25+
# path. otherwise pytest gets confused.
26+
# https://github.com/pytest-dev/pytest/issues/13368
27+
ruby = ruby.lstrip("$")
28+
return ruby # type: ignore
2429

2530

2631
##========================================================================================================

0 commit comments

Comments
 (0)