Skip to content

Commit

Permalink
--files flag windows support (#30222)
Browse files Browse the repository at this point in the history
* --files flag windows support

* Update utils.js

* lint-rollin
  • Loading branch information
samouri committed Sep 14, 2020
1 parent 43c953f commit a670e5c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion build-system/common/utils.js
Expand Up @@ -92,8 +92,16 @@ function logFiles(files) {
* @return {Array<string>}
*/
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)
)
: [];
}

Expand Down

0 comments on commit a670e5c

Please sign in to comment.