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

Commit 5d486a0

Browse files
author
Alan Shaw
committed
fix: fixes for windows
License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent a69351e commit 5d486a0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/utils/files/glob-source.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ module.exports = (...args) => {
4343

4444
try {
4545
const sources = results.map(res => toGlobSource(res, globSourceOptions))
46-
return deferred.resolve(cat(sources))
46+
deferred.resolve(cat(sources))
4747
} catch (err) {
48-
return deferred.abort(err)
48+
deferred.abort(err)
4949
}
5050
})
5151

@@ -94,7 +94,7 @@ function toGlobSource ({ path, type }, options) {
9494
return pull(
9595
pusher,
9696
pull.map(p => ({
97-
path: Path.join(baseName, p),
97+
path: `${baseName}/${toPosix(p)}`,
9898
contentPath: Path.join(path, p)
9999
}))
100100
)
@@ -107,8 +107,10 @@ function normalizePathWithType (path, cb) {
107107
}, (err, res) => {
108108
if (err) return cb(err)
109109
cb(null, {
110-
path: res.realpath.replace(/\\/g, '/'),
110+
path: toPosix(res.realpath),
111111
type: res.stat.isDirectory() ? 'dir' : 'file'
112112
})
113113
})
114114
}
115+
116+
const toPosix = path => path.replace(/\\/g, '/')

0 commit comments

Comments
 (0)