From 60e614b10ce31bf84b43efd06d77d47991c39bf0 Mon Sep 17 00:00:00 2001 From: Robin Andersson Date: Sun, 15 Oct 2017 21:18:20 +0200 Subject: [PATCH] cpplint skip to run if dependencies has not been bootstrapped See #10593 for the discussion regarding this --- script/cpplint.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/script/cpplint.py b/script/cpplint.py index e602b3cb1e6b..5dfca8f76ece 100755 --- a/script/cpplint.py +++ b/script/cpplint.py @@ -38,6 +38,10 @@ SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def main(): + if not os.path.isfile(cpplint_path()): + print("[INFO] Skipping cpplint, dependencies has not been bootstrapped") + return + os.chdir(SOURCE_ROOT) atom_files = list_files('atom', ['app', 'browser', 'common', 'renderer', 'utility'], @@ -60,9 +64,13 @@ def list_files(parent, directories, filters): def call_cpplint(files): - cpplint = os.path.join(SOURCE_ROOT, 'vendor', 'depot_tools', 'cpplint.py') + cpplint = cpplint_path() execute([sys.executable, cpplint] + files) +def cpplint_path(): + return os.path.join(SOURCE_ROOT, 'vendor', 'depot_tools', 'cpplint.py') + + if __name__ == '__main__': sys.exit(main())