mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
sshaskpass: disable echo more aggressively
Summary: Disable echo for "Enter passphrase for key". Reviewed By: phillco Differential Revision: D7592208 fbshipit-source-id: 79afb7bb49d952239571c1ddb8d3f5c32071d49b
This commit is contained in:
parent
4affcfaa2a
commit
8e1acfaaa4
@ -220,7 +220,11 @@ def _shoulddisableecho(prompt):
|
||||
# we don't have the "flag" information from openssh's
|
||||
# read_passphrase(const char *prompt, int flags).
|
||||
# guess from the prompt string.
|
||||
return prompt.find('assword:') >= 0
|
||||
# do not match "Passcode or option"
|
||||
if 'Passcode or option' in prompt:
|
||||
return False
|
||||
# match "password", "Password", "passphrase", "Passphrase".
|
||||
return prompt.find('ass') >= 0
|
||||
|
||||
def _sshaskpassmain(prompt):
|
||||
"""the ssh-askpass client"""
|
||||
|
Loading…
Reference in New Issue
Block a user