mirror of https://github.com/zulip/zulip.git
update-prod-static: Fix incorrect ordering of venv setup code.
We should check if we succeeded in using a venv only after we've actually setup sys.path to use it.
This commit is contained in:
parent
b809646854
commit
1005d70ff5
|
@ -9,10 +9,6 @@ import subprocess
|
|||
import argparse
|
||||
import sys
|
||||
|
||||
# check for the venv
|
||||
from lib import sanity_check
|
||||
sanity_check.check_venv(__file__)
|
||||
|
||||
# We need settings so we can figure out where the prod-static directory is.
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
|
||||
import scripts.lib.setup_path_on_import
|
||||
|
@ -20,6 +16,10 @@ os.environ['DJANGO_SETTINGS_MODULE'] = 'zproject.settings'
|
|||
from django.conf import settings
|
||||
from scripts.lib.node_cache import setup_node_modules
|
||||
|
||||
# check for the venv
|
||||
from lib import sanity_check
|
||||
sanity_check.check_venv(__file__)
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--prev-deploy', metavar='DIR',
|
||||
help='a previous deploy from which to reuse files if possible')
|
||||
|
|
Loading…
Reference in New Issue