Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: path is always posix
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
  • Loading branch information
Alan Shaw committed Dec 17, 2018
1 parent db3c183 commit 384a9e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/files/glob-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ function normalizePathWithType (path, cb) {
realpath: cb => fs.realpath(path, cb)
}, (err, res) => {
if (err) return cb(err)
cb(null, { path: res.realpath, type: res.stat.isDirectory() ? 'dir' : 'file' })
cb(null, {
path: res.realpath.replace(/\\/g, '/'),
type: res.stat.isDirectory() ? 'dir' : 'file'
})
})
}

0 comments on commit 384a9e6

Please sign in to comment.