mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 09:02:10 +00:00
fix: dont attempt migrating to active virtualenv
This commit is contained in:
parent
e37df969c1
commit
0e59159e11
@ -177,6 +177,15 @@ def migrate_env(python, backup=False):
|
|||||||
python = which(python)
|
python = which(python)
|
||||||
pvenv = os.path.join(path, nvenv)
|
pvenv = os.path.join(path, nvenv)
|
||||||
|
|
||||||
|
if python.startswith(pvenv):
|
||||||
|
# The supplied python version is in active virtualenv which we are about to nuke.
|
||||||
|
click.secho(
|
||||||
|
"Python version supplied is present in currently sourced virtual environment.\n"
|
||||||
|
"`deactiviate` the current virtual environment before migrating environments.",
|
||||||
|
fg="yellow",
|
||||||
|
)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
# Clear Cache before Bench Dies.
|
# Clear Cache before Bench Dies.
|
||||||
try:
|
try:
|
||||||
config = bench.conf
|
config = bench.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user