We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38f4c5c commit 207bea5Copy full SHA for 207bea5
2 files changed
src/manage/aliasutils.py
@@ -239,6 +239,7 @@ def _parse_entrypoint_line(line):
239
name, sep, rest = line.partition("=")
240
name = name.strip()
241
if name and name[0].isalnum() and sep and rest:
242
+ # "names" that have a parent directory/slash are invalid
243
if PurePath(name).parent:
244
return None, None, None
245
mod, sep, rest = rest.partition(":")
tests/test_alias.py
@@ -121,6 +121,7 @@ def test_write_script_alias(alias_checker):
121
"..\\evil_path",
122
"dir\\..\\evil_path",
123
"normal\\subdir",
124
+ "C:\\absolute\\evil_path",
125
])
126
def test_write_invalid_alias_name(alias_checker, name):
127
with pytest.raises(ValueError):
0 commit comments