Skip to content

Commit

Permalink
installer: handle NotImplementedError on symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
havocbane committed Oct 29, 2021
1 parent 82459bd commit 1207ec4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions install-poetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,9 +558,10 @@ def make_bin(self, version: str) -> None:
self._bin_dir.joinpath(script).symlink_to(
self._data_dir.joinpath(target_script)
)
except OSError:
# This can happen if the user
# does not have the correct permission on Windows
except (NotImplementedError, OSError):
# This can happen if the user does not have the correct permission
# or if they are using PyPy which does not implement symlink on
# Windows.
shutil.copy(
self._data_dir.joinpath(target_script), self._bin_dir.joinpath(script)
)
Expand Down

0 comments on commit 1207ec4

Please sign in to comment.