Skip to content

Commit

Permalink
Swap order of realpath() and normcase() in generate_env_name()
Browse files Browse the repository at this point in the history
Co-authored-by: Randy Döring <30527984+radoering@users.noreply.github.com>
  • Loading branch information
adamgreg and radoering authored Aug 3, 2022
1 parent 874be14 commit c8c6129
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/poetry/utils/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ def get_base_prefix(cls) -> Path:
def generate_env_name(cls, name: str, cwd: str) -> str:
name = name.lower()
sanitized_name = re.sub(r'[ $`!*@"\\\r\n\t]', "_", name)[:42]
normalized_cwd = os.path.realpath(os.path.normcase(cwd))
normalized_cwd = os.path.normcase(os.path.realpath(cwd))
h_bytes = hashlib.sha256(encode(normalized_cwd)).digest()
h_str = base64.urlsafe_b64encode(h_bytes).decode()[:8]

Expand Down

0 comments on commit c8c6129

Please sign in to comment.