Updates npm_test to work on Windows
process.env.PWD does not exist on Windows, so we default to asking for
the current working directory there instead.
TBR=tvanderlippe@chromium.org
Change-Id: I35ba848aee686ed066bf095afa3d05b45f527139
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2102715
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
diff --git a/scripts/npm_test.js b/scripts/npm_test.js
index 68786c3..a35bab8 100644
--- a/scripts/npm_test.js
+++ b/scripts/npm_test.js
@@ -27,7 +27,7 @@
const PLATFORM = getPlatform();
const PYTHON = process.platform === 'win32' ? 'python.bat' : 'python';
-const CURRENT_PATH = process.env.PWD; // Using env.PWD to account for symlinks.
+const CURRENT_PATH = process.env.PWD || process.cwd(); // Using env.PWD to account for symlinks.
const isThirdParty = CURRENT_PATH.includes('third_party');
const CHROMIUM_SRC_PATH = CUSTOM_CHROMIUM_PATH || getChromiumSrcPath(isThirdParty);
const RELEASE_PATH = path.resolve(CHROMIUM_SRC_PATH, 'out', TARGET);