Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 'slash' on input files before globbing to support absolute paths with backslashes on Windows #355

Merged
merged 1 commit into from Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion index.js
Expand Up @@ -8,6 +8,7 @@ const stdin = require('get-stdin')
const read = require('read-cache')
const chalk = require('chalk')
const globber = require('globby')
const slash = require('slash')
const chokidar = require('chokidar')

const postcss = require('postcss')
Expand Down Expand Up @@ -57,7 +58,7 @@ Promise.resolve()
}

if (input && input.length) {
return globber(input, { dot: argv.includeDotfiles })
return globber(input.map(slash), { dot: argv.includeDotfiles })
}

if (argv.replace || argv.dir) {
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -28,6 +28,7 @@
"postcss-reporter": "^7.0.0",
"pretty-hrtime": "^1.0.3",
"read-cache": "^1.0.0",
"slash": "^3.0.0",
"yargs": "^16.0.0"
},
"devDependencies": {
Expand Down