Commit d2dcac5c authored by Jeff Fisher's avatar Jeff Fisher Committed by Commit Bot

DevTools: Fix presubmit scripts on Windows

This fixes a couple presubmit issues when running on Windows:

* check_gn didn't properly normalize paths
* eslint didn't execute in node successfully since the bin style for the
npm install was unix specific (it's a CMD file on Windows)


Bug: 929919
Change-Id: Iec7e1057254047bd0a6539e16df964dc8a58d528
Reviewed-on: https://chromium-review.googlesource.com/c/1459576Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Jeff Fisher <jeffish@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#633810}
parent 85f99066
......@@ -73,7 +73,7 @@ function checkAllDevToolsFiles() {
const errors = [];
const excludedFiles = ['InspectorBackendCommands.js', 'SupportedCSSProperties.js', 'ARIAProperties.js'];
const gnVariable = 'all_devtools_files';
const lines = selectGNLines(`${gnVariable} = [`, ']');
const lines = selectGNLines(`${gnVariable} = [`, ']').map(path.normalize);
if (!lines.length) {
return [
'Could not identify all_devtools_files list in gn file',
......
......@@ -11,8 +11,7 @@ import sys
SCRIPTS_PATH = path.dirname(path.abspath(__file__))
THIRD_PARTY_PATH = path.join(SCRIPTS_PATH, '..', '..', '..', '..')
NODE_PATH = path.join(THIRD_PARTY_PATH, 'node')
ESLINT_PATH = path.join(THIRD_PARTY_PATH, 'devtools-node-modules', 'third_party',
'node_modules', '.bin', 'eslint')
ESLINT_PATH = path.join(THIRD_PARTY_PATH, 'devtools-node-modules', 'third_party', 'node_modules', 'eslint', 'bin', 'eslint.js')
try:
old_sys_path = sys.path[:]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment