From c634575b3d838037a908cad3830ef3ebddc861b8 Mon Sep 17 00:00:00 2001 From: Matthias Christen Date: Tue, 20 Oct 2020 16:29:52 +0200 Subject: [PATCH] Use 'slash' on input files before globbing to support absolute paths with backslashes on Windows (#355) --- index.js | 3 ++- package.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index aeccc51..edc7a3f 100644 --- a/index.js +++ b/index.js @@ -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') @@ -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) { diff --git a/package.json b/package.json index 5f55fed..7ababaa 100644 --- a/package.json +++ b/package.json @@ -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": {