We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c222966 commit 5624963Copy full SHA for 5624963
changelog/37.bugfix.rst
@@ -0,0 +1 @@
1
+Properly handle non relative paths
src/ptscripts/virtualenv.py
@@ -176,7 +176,11 @@ def _create_virtualenv(self) -> None:
176
if self.system_site_packages:
177
cmd.append("--system-site-packages")
178
cmd.append(str(self.venv_dir))
179
- self.ctx.info(f"Creating virtualenv({self.name}) in {self.venv_dir.relative_to(CWD)}")
+ try:
180
+ relative_venv_path = self.venv_dir.relative_to(CWD)
181
+ except ValueError:
182
+ relative_venv_path = self.venv_dir
183
+ self.ctx.info(f"Creating virtualenv({self.name}) in {relative_venv_path}")
184
self.run(*cmd, cwd=str(self.venv_dir.parent))
185
self.install(
186
"-U",
0 commit comments