Commit 8cf7bf7a by Sébastien Eustace Committed by Arun Babu Neelicattu

Fix issues on Windows

parent 1d1cd781
......@@ -528,9 +528,16 @@ class Installer:
if self._bin_dir.joinpath(script).exists():
self._bin_dir.joinpath(script).unlink()
self._bin_dir.joinpath(script).symlink_to(
self._data_dir.joinpath(target_script)
)
try:
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
shutil.copy(
self._data_dir.joinpath(target_script), self._bin_dir.joinpath(script)
)
def install_poetry(self, version: str, env_path: Path) -> None:
self._overwrite(
......@@ -553,7 +560,7 @@ class Installer:
else:
specification = f"poetry=={version}"
subprocess.call(
subprocess.run(
[str(python), "-m", "pip", "install", specification],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment