Skip to content

Commit cf300ca

Browse files
authored
Avoid duplicate path specification in pip install (#313)
Because of muscle memory, it may be tempting to type `spin install .` as one would `pip install .`. This patch ensures that only one `.` is present in the command, otherwise it results in a conflict of the package with itself.
1 parent 123de62 commit cf300ca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spin/cmds/pip.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,7 @@ def install(*, pip_args, editable, verbose, verbose_import):
5151
if verbose:
5252
pip_args = ["-v"] + pip_args
5353

54+
if "." in pip_args:
55+
pip_args.remove(".")
56+
5457
_run(pip_cmd + pip_args + ["."], sys_exit=False, replace=True)

0 commit comments

Comments
 (0)