mirror of
https://github.com/muxueqz/git-credential-pass.git
synced 2024-11-23 08:19:28 +01:00
Fix: No prompt for the password, then an error #1
This commit is contained in:
parent
9e91943a07
commit
dac69aa386
1 changed files with 23 additions and 7 deletions
|
@ -52,13 +52,29 @@ if operation == "get":
|
|||
)
|
||||
find_path = _find_path.decode('utf8').replace(password_store_path, '').strip('\n')
|
||||
|
||||
client = subprocess.check_output(
|
||||
[
|
||||
'pass',
|
||||
'show',
|
||||
find_path,
|
||||
]
|
||||
)
|
||||
try:
|
||||
client = subprocess.check_output(
|
||||
[
|
||||
'pass',
|
||||
'show',
|
||||
find_path,
|
||||
]
|
||||
)
|
||||
except subprocess.CalledProcessError:
|
||||
subprocess.check_output(
|
||||
[
|
||||
'xterm', '-e',
|
||||
'pass show "%s"' % find_path,
|
||||
]
|
||||
)
|
||||
client = subprocess.check_output(
|
||||
[
|
||||
'pass',
|
||||
'show',
|
||||
find_path,
|
||||
]
|
||||
)
|
||||
|
||||
extractor = client.decode('utf8').split('\n')
|
||||
repo_logins = {}
|
||||
repo_logins['login'] = ': '.join(extractor[1].split(': ')[1:])
|
||||
|
|
Loading…
Reference in a new issue