Skip to content

Commit c634575

Browse files
Use 'slash' on input files before globbing to support absolute paths with backslashes on Windows (postcss#355)
1 parent c94c188 commit c634575

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const stdin = require('get-stdin')
88
const read = require('read-cache')
99
const chalk = require('chalk')
1010
const globber = require('globby')
11+
const slash = require('slash')
1112
const chokidar = require('chokidar')
1213

1314
const postcss = require('postcss')
@@ -57,7 +58,7 @@ Promise.resolve()
5758
}
5859

5960
if (input && input.length) {
60-
return globber(input, { dot: argv.includeDotfiles })
61+
return globber(input.map(slash), { dot: argv.includeDotfiles })
6162
}
6263

6364
if (argv.replace || argv.dir) {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"postcss-reporter": "^7.0.0",
2929
"pretty-hrtime": "^1.0.3",
3030
"read-cache": "^1.0.0",
31+
"slash": "^3.0.0",
3132
"yargs": "^16.0.0"
3233
},
3334
"devDependencies": {

0 commit comments

Comments
 (0)