From 2173b0f3783a38a44fe372553e91781b02e5b7a6 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Fri, 23 Jan 2026 12:01:52 -0800 Subject: [PATCH] Avoid duplicate path specification in `pip install` 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. --- spin/cmds/pip.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spin/cmds/pip.py b/spin/cmds/pip.py index 815c3ff..b089597 100644 --- a/spin/cmds/pip.py +++ b/spin/cmds/pip.py @@ -51,4 +51,7 @@ def install(*, pip_args, editable, verbose, verbose_import): if verbose: pip_args = ["-v"] + pip_args + if "." in pip_args: + pip_args.remove(".") + _run(pip_cmd + pip_args + ["."], sys_exit=False, replace=True)