mirror of
https://github.com/frappe/bench.git
synced 2024-11-13 16:56:33 +00:00
Merge pull request #866 from gavindsouza/bench-venv-fix
fix: bench update compatible venv installed pkg
This commit is contained in:
commit
7798c4b5f3
@ -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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user