mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
provision.py: Add a conditional to remove '.eslintcache'.
It was discovered that the '.eslintcache' file was causing eslint to throw a TypeError after a recent update/addition to the dependencies. It makes sense to remove this file as part of the provisioning process to avoid such exceptions.
This commit is contained in:
@@ -575,6 +575,14 @@ def main(options):
|
|||||||
|
|
||||||
run(["scripts/lib/clean-unused-caches"])
|
run(["scripts/lib/clean-unused-caches"])
|
||||||
|
|
||||||
|
# Keeping this cache file around can cause eslint to throw
|
||||||
|
# random TypeErrors when new/updated dependencies are added
|
||||||
|
if os.path.isfile('.eslintcache'):
|
||||||
|
# Remove this block when
|
||||||
|
# https://github.com/eslint/eslint/issues/11639 is fixed
|
||||||
|
# upstream.
|
||||||
|
os.remove('.eslintcache')
|
||||||
|
|
||||||
version_file = os.path.join(UUID_VAR_PATH, 'provision_version')
|
version_file = os.path.join(UUID_VAR_PATH, 'provision_version')
|
||||||
print('writing to %s\n' % (version_file,))
|
print('writing to %s\n' % (version_file,))
|
||||||
open(version_file, 'w').write(PROVISION_VERSION + '\n')
|
open(version_file, 'w').write(PROVISION_VERSION + '\n')
|
||||||
|
|||||||
Reference in New Issue
Block a user