Commit 498c2665 by Yap Sok Ann

Locate easy_install path after (optionally) creating virtualenv.

Without this, the first call to the easy_install module with a new virtualenv
will only create the virtualenv without installing the intended package, since
the `_is_package_installed` check will succeed as running /usr/bin/easy_install
as non-root user will return permission denied error with empty stdout.
parent 808d9596
...@@ -94,7 +94,6 @@ def main(): ...@@ -94,7 +94,6 @@ def main():
name = module.params['name'] name = module.params['name']
env = module.params['virtualenv'] env = module.params['virtualenv']
easy_install = module.get_bin_path('easy_install', True, ['%s/bin' % env])
site_packages = module.params['virtualenv_site_packages'] site_packages = module.params['virtualenv_site_packages']
virtualenv_command = module.params['virtualenv_command'] virtualenv_command = module.params['virtualenv_command']
...@@ -117,6 +116,8 @@ def main(): ...@@ -117,6 +116,8 @@ def main():
out += out_venv out += out_venv
err += err_venv err += err_venv
easy_install = module.get_bin_path('easy_install', True, ['%s/bin' % env])
cmd = None cmd = None
changed = False changed = False
installed = _is_package_installed(module, name, easy_install) installed = _is_package_installed(module, name, easy_install)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment