2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-22 20:19:01 +00:00

Merge pull request #866 from gavindsouza/bench-venv-fix

fix: bench update compatible venv installed pkg
This commit is contained in:
gavin 2019-11-29 17:21:52 +05:30 committed by GitHub
commit 7798c4b5f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -503,6 +503,10 @@ def update_npm_packages(bench_path='.'):
def install_requirements(pip, req_file, user=False):
if os.path.exists(req_file):
# sys.real_prefix exists only in a virtualenv
if hasattr(sys, 'real_prefix'):
user = False
user_flag = "--user" if user else ""
exec_cmd("{pip} install {user_flag} -q -U -r {req_file}".format(pip=pip, user_flag=user_flag, req_file=req_file))