Merge pull request #1027 from apollo13/patch-1
Added os.path.expanduser when searching for pip executable.
This commit is contained in:
commit
e8f56bb627
2 changed files with 2 additions and 3 deletions
|
@ -179,6 +179,7 @@ def _get_pip(module, env=None, executable=None):
|
|||
candidate_pip_basenames = ['pip', 'python-pip', 'pip-python']
|
||||
pip = None
|
||||
if executable is not None:
|
||||
executable = os.path.expanduser(executable)
|
||||
if os.path.isabs(executable):
|
||||
pip = executable
|
||||
else:
|
||||
|
|
|
@ -232,8 +232,6 @@ def main():
|
|||
if not module.params[param]:
|
||||
module.fail_json(msg='%s param is required for command=%s' % (param, command))
|
||||
|
||||
venv = module.params['virtualenv']
|
||||
|
||||
_ensure_virtualenv(module)
|
||||
|
||||
cmd = "python manage.py %s" % (command, )
|
||||
|
@ -254,7 +252,7 @@ def main():
|
|||
if module.params[param]:
|
||||
cmd = '%s %s' % (cmd, module.params[param])
|
||||
|
||||
rc, out, err = module.run_command(cmd, cwd=app_path)
|
||||
rc, out, err = module.run_command(cmd, cwd=os.path.expanduser(app_path))
|
||||
if rc != 0:
|
||||
if command == 'createcachetable' and 'table' in err and 'already exists' in err:
|
||||
out = 'Already exists.'
|
||||
|
|
Loading…
Add table
Reference in a new issue