Skip to content

Commit

Permalink
Handle NotImplementedError when creating symlink on install; fixes py…
Browse files Browse the repository at this point in the history
  • Loading branch information
havocbane committed Oct 14, 2021
1 parent 82459bd commit 055a499
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
os: [Ubuntu, MacOS, Windows]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ["3.6", "3.7", "3.8", "3.9", "pypy-3.7"]
experimental: [false]
bootstrap-args: [""]
include:
Expand Down
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 055a499

Please sign in to comment.