Skip to content

Commit

Permalink
catch os.getcwd
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Feb 11, 2024
1 parent 289ad77 commit c1b00ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/black/files.py
Expand Up @@ -263,9 +263,9 @@ def resolves_outside_root_or_cannot_stat(
Returns whether the path is a symbolic link that points outside the
root directory. Also returns True if we failed to resolve the path.
"""
if sys.version_info < (3, 8, 6):
path = path.absolute() # https://bugs.python.org/issue33660
try:
if sys.version_info < (3, 8, 6):
path = path.absolute() # https://bugs.python.org/issue33660
resolved_path = path.resolve()
except OSError as e:
if report:
Expand Down

0 comments on commit c1b00ef

Please sign in to comment.