mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Fixes #6567 put the git wrapper script in the module temp dir
This commit is contained in:
@@ -1142,3 +1142,5 @@ class AnsibleModule(object):
|
||||
break
|
||||
return '%.2f %s' % (float(size)/ limit, suffix)
|
||||
|
||||
def get_module_path():
|
||||
return os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
@@ -143,7 +143,8 @@ import re
|
||||
import tempfile
|
||||
|
||||
def write_ssh_wrapper():
|
||||
fd, wrapper_path = tempfile.mkstemp()
|
||||
module_dir = get_module_path()
|
||||
fd, wrapper_path = tempfile.mkstemp(prefix=module_dir + '/')
|
||||
fh = os.fdopen(fd, 'w+b')
|
||||
template = """#!/bin/sh
|
||||
if [ -z "$GIT_SSH_OPTS" ]; then
|
||||
|
||||
Reference in New Issue
Block a user