Skip to content

Commit 5ada75b

Browse files
committed
[WIP] pip-sync
1 parent ab2cc23 commit 5ada75b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

piptools/scripts/sync.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ def cli(
9898
if config:
9999
log.debug(f"Using pip-tools configuration defaults found in '{config !s}'.")
100100

101+
current_python = sys.executable
102+
log.debug(f"{current_python=}")
103+
env_python = shutil.which("python")
104+
log.debug(f"{env_python=}")
105+
106+
if python_executable is None and current_python != env_python:
107+
# pip-tools probably installed globally (e.g. via pipx)
108+
python_executable = env_python
109+
101110
if python_executable:
102111
_validate_python_executable(python_executable)
103112

0 commit comments

Comments
 (0)