Don't prepend PWD to file paths for natives generation
roll_deps.py was upgraded to Python3 in https://crrev.com/c/3521887.
This changed the paths that are passed to the natives generation script
to be absolute and no longer relative.
To account for this, we no longer prepend the working directory to
calculated paths.
R=jobay@chromium.org
Bug: None
Change-Id: Ia0a0f946e27d61fa64e7856daef0f709fb058365
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3607830
Reviewed-by: Johan Bay <jobay@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
diff --git a/scripts/javascript_natives/index.js b/scripts/javascript_natives/index.js
index 58221a6..bc75452 100644
--- a/scripts/javascript_natives/index.js
+++ b/scripts/javascript_natives/index.js
@@ -4,7 +4,6 @@
import * as fs from 'fs';
import glob from 'glob';
-import * as path from 'path';
import ts from 'typescript';
import * as WebIDL2 from 'webidl2';
@@ -45,7 +44,7 @@
if (file.includes('testing')) {
continue;
}
- const data = fs.readFileSync(path.join(process.env.PWD, file), 'utf8');
+ const data = fs.readFileSync(file, 'utf8');
const lines = data.split('\n');
const newLines = [];
for (const line of lines) {