From bb382a1ef6db39c7dbb31875188b862f47f8bd8c Mon Sep 17 00:00:00 2001 From: Thomas Wang Date: Fri, 3 May 2024 12:23:47 +1000 Subject: [PATCH] added code change --- lib/ansible/modules/pip.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/pip.py b/lib/ansible/modules/pip.py index 99ac446c868..4241800f56a 100644 --- a/lib/ansible/modules/pip.py +++ b/lib/ansible/modules/pip.py @@ -721,8 +721,10 @@ def main(): env = module.params['virtualenv'] venv_created = False - if env and chdir: - env = os.path.join(chdir, env) + if env: + if chdir: + env = os.path.join(chdir, env) + env = os.path.abspath(env) if umask and not isinstance(umask, int): try: