We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d488c31 commit 38f4c5cCopy full SHA for 38f4c5c
1 file changed
src/manage/aliasutils.py
@@ -99,7 +99,7 @@ def _create_alias(
99
p = cmd.global_dir / name
100
# Raise exception if someone has tried to get us to write outside of the
101
# intended directory
102
- if str(p.relative_to(cmd.global_dir)) != name:
+ if str(p.relative_to(cmd.global_dir)) != PurePath(name).name:
103
raise ValueError(f"Invalid alias name: {name}")
104
if not p.match("*.exe"):
105
p = p.with_name(p.name + ".exe")
0 commit comments