Skip to content

Commit 4fc2008

Browse files
committed
Prevent keyring from ever reading from stdin
It shouldn't need to ever so no reason to allow it and have to jiggle around the `--no-input` option in `pip`.
1 parent 5137ce2 commit 4fc2008

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pip/_internal/network/auth.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ def __init__(self, keyring: str) -> None:
4747
def get_password(self, service_name: str, username: str) -> Optional[str]:
4848
cmd = [self.keyring, "get", service_name, username]
4949
res = subprocess.run(
50-
cmd, capture_output=True, env=dict(PYTHONIOENCODING="utf-8")
50+
cmd,
51+
stdin=subprocess.DEVNULL,
52+
capture_output=True,
53+
env=dict(PYTHONIOENCODING="utf-8"),
5154
)
5255
if res.returncode:
5356
return None

0 commit comments

Comments
 (0)