mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fix git wrapper (#29069)
* fix git wrapper * fallback to bin/sh * Use percent formatting as per sivel's review
This commit is contained in:
parent
cd2774af78
commit
f8005d2737
1 changed files with 3 additions and 2 deletions
|
@ -371,9 +371,10 @@ fi
|
||||||
|
|
||||||
def set_git_ssh(ssh_wrapper, key_file, ssh_opts):
|
def set_git_ssh(ssh_wrapper, key_file, ssh_opts):
|
||||||
|
|
||||||
if os.environ.get("GIT_SSH"):
|
# git_ssh_command will override git_ssh, so only older git needs it
|
||||||
del os.environ["GIT_SSH"]
|
|
||||||
os.environ["GIT_SSH"] = ssh_wrapper
|
os.environ["GIT_SSH"] = ssh_wrapper
|
||||||
|
# using shell to avoid 'noexec' issues if module temp dir is located in such a mount
|
||||||
|
os.environ["GIT_SSH_COMMAND"] = '%s %s' % (os.environ.get('SHELL', '/bin/sh'), ssh_wrapper)
|
||||||
|
|
||||||
if os.environ.get("GIT_KEY"):
|
if os.environ.get("GIT_KEY"):
|
||||||
del os.environ["GIT_KEY"]
|
del os.environ["GIT_KEY"]
|
||||||
|
|
Loading…
Reference in a new issue