Merge pull request #28 from ymage/handle_already_set_variable

Fix for already set SSH_ASKPASS env var
This commit is contained in:
Joao Jacome 2022-08-22 12:25:20 +01:00 committed by GitHub
commit f4d7dd2bf0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -305,7 +305,7 @@ if __name__ == '__main__':
logging.error('"%s" error: %s', error.cmd[0], error.stderr) logging.error('"%s" error: %s', error.cmd[0], error.stderr)
logging.debug('Error running %s', error.cmd) logging.debug('Error running %s', error.cmd)
if os.environ.get('SSH_ASKPASS'): if os.environ.get('SSH_ASKPASS') and os.environ.get('SSH_ASKPASS') == os.path.realpath(__file__):
print(os.environ.get('SSH_KEY_PASSPHRASE')) print(os.environ.get('SSH_KEY_PASSPHRASE'))
else: else:
main() main()