mirror of https://github.com/ansible/ansible.git
pip: combine chdir and env only when env is set (#40793)
* pip: combine chdir and env only when env is set This fixes an AttributeError when chdir without virtualenv is specified: File "/tmp/ansible_2UAFsZ/ansible_module_pip.py", line 387, in main env = os.path.join(chdir, env) File "/usr/lib64/python2.7/posixpath.py", line 75, in join if b.startswith('/'): AttributeError: 'NoneType' object has no attribute 'startswith' * Add test for pip with chdir Signed-off-by: Till Maas <opensource@till.name>pull/44089/merge
parent
fd4e774cec
commit
bb85bbceeb
@ -0,0 +1,2 @@
|
|||||||
|
def main():
|
||||||
|
print("success")
|
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name="ansible_test_pip_chdir",
|
||||||
|
version="0",
|
||||||
|
packages=find_packages(),
|
||||||
|
entry_points={
|
||||||
|
'console_scripts': [
|
||||||
|
'ansible_test_pip_chdir = ansible_test_pip_chdir:main'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
)
|
Loading…
Reference in New Issue