mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Merge pull request #5274 from veeti/easy_install_chdir
Fix permission error when using easy_install through sudo
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import tempfile
|
||||
import os.path
|
||||
|
||||
DOCUMENTATION = '''
|
||||
@@ -151,6 +152,7 @@ def main():
|
||||
command = '%s %s' % (virtualenv, env)
|
||||
if site_packages:
|
||||
command += ' --system-site-packages'
|
||||
os.chdir(tempfile.gettempdir())
|
||||
rc_venv, out_venv, err_venv = module.run_command(command)
|
||||
|
||||
rc += rc_venv
|
||||
|
||||
Reference in New Issue
Block a user