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())