diff --git a/build-system/common/utils.js b/build-system/common/utils.js index 416ddc21eaaa..f8eeba7d9b0a 100644 --- a/build-system/common/utils.js +++ b/build-system/common/utils.js @@ -92,8 +92,16 @@ function logFiles(files) { * @return {Array} */ function getFilesFromArgv() { + // TODO: https://github.com/ampproject/amphtml/issues/30223 + // Switch from globby to a lib that supports Windows. + const toPosix = (str) => str.replace(/\\\\?/g, '/'); return argv.files - ? globby.sync(argv.files.split(',').map((s) => s.trim())) + ? globby.sync( + argv.files + .split(',') + .map((s) => s.trim()) + .map(toPosix) + ) : []; }