Files
react-native-devtools-frontend/scripts/test/run_lint_check.py
T
Tim van der Lippe 8e12f92229 Use Python version bundled with depot_tools for all scripts
depot_tools ships a "vpython" binary that is added to the $PATH
for all Chromium engineers. This binary is versioned by depot_tools
which we roll in ourselves as part of `gclient sync`.

By using `vpython` instead of `python`, we are no longer depended
on the Python version installed locally and instead use the version
we pull in from DEPS.

R=liviurau@chromium.org

Change-Id: If49a54c24b6cf129ff843cd9ca1140a723a78afb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2571462
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-04 14:08:59 +00:00

36 lines
903 B
Python
Executable File

#!/usr/bin/env vpython
#
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# TODO(1083142): remove this file in favor of run_lint_check_js.py once
# infra has been updated.
import sys
from os import path
from subprocess import Popen
scripts_path = path.dirname(path.dirname(path.abspath(__file__)))
sys.path.append(scripts_path)
import devtools_paths
CURRENT_DIRECTORY = path.dirname(path.abspath(__file__))
ROOT_DIRECTORY = path.normpath(path.join(CURRENT_DIRECTORY, '..', '..'))
def main():
exec_command = [
devtools_paths.node_path(),
path.join(CURRENT_DIRECTORY, 'run_lint_check_js.js'),
]
eslint_proc = Popen(exec_command, cwd=ROOT_DIRECTORY)
eslint_proc.communicate()
sys.exit(eslint_proc.returncode)
if __name__ == '__main__':
main()