Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(749)

Unified Diff: third_party/WebKit/Source/devtools/scripts/lint_javascript.py

Issue 2554573010: DevTools: fix presubmit hooks for windows (Closed)
Patch Set: include utils.py in BUILD.gn isolate target Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/scripts/lint_javascript.py
diff --git a/third_party/WebKit/Source/devtools/scripts/lint_javascript.py b/third_party/WebKit/Source/devtools/scripts/lint_javascript.py
index 3f1e234c1709144e6e3793f5dd4e42e1494dc9e8..33904417ab9002acfd4b0301a15ed80004cfe0f6 100755
--- a/third_party/WebKit/Source/devtools/scripts/lint_javascript.py
+++ b/third_party/WebKit/Source/devtools/scripts/lint_javascript.py
@@ -29,8 +29,8 @@ if len(sys.argv) >= 2:
is_cygwin = sys.platform == "cygwin"
-def popen(arguments):
- return subprocess.Popen(arguments, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+def popen(arguments, cwd=None):
+ return subprocess.Popen(arguments, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
def to_platform_path(filepath):
@@ -49,7 +49,7 @@ def to_platform_path_exact(filepath):
scripts_path = path.dirname(path.abspath(__file__))
devtools_path = path.dirname(scripts_path)
devtools_frontend_path = path.join(devtools_path, "front_end")
-eslint_path = path.join(devtools_path, "node_modules", ".bin", "eslint")
+eslint_path = path.join(devtools_path, "node_modules", "eslint", "bin", "eslint.js")
print("Linting JavaScript with eslint...\n")
@@ -75,7 +75,7 @@ def js_lint(files_list=None):
"--ignore-path", to_platform_path_exact(eslintignore_path),
] + files_list
- eslint_proc = popen(exec_command)
+ eslint_proc = popen(exec_command, cwd=devtools_path)
(eslint_proc_out, _) = eslint_proc.communicate()
if eslint_proc.returncode != 0:
eslint_errors_found = True
« no previous file with comments | « third_party/WebKit/Source/devtools/scripts/install_node_deps.py ('k') | third_party/WebKit/Source/devtools/scripts/utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698