From ececf0a2099b0d74b1378028da8c18d41892aba8 Mon Sep 17 00:00:00 2001 From: Wyatt Hoodes Date: Thu, 18 Apr 2019 22:10:16 -1000 Subject: [PATCH] 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. --- tools/lib/provision.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/lib/provision.py b/tools/lib/provision.py index a6f577540d..a003bdad07 100755 --- a/tools/lib/provision.py +++ b/tools/lib/provision.py @@ -575,6 +575,14 @@ def main(options): 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') print('writing to %s\n' % (version_file,)) open(version_file, 'w').write(PROVISION_VERSION + '\n')