Fix template file path in windows

This commit is contained in:
Emanuel Herrera 2016-11-19 20:24:40 -03:00
parent fa68b8b383
commit 9a915ba63e
1 changed files with 6 additions and 1 deletions

View File

@ -20,7 +20,12 @@ const r = function () {
if (_.last(args).includes('~')) {
return _.last(args)
}
return resolve.apply(null, arguments)
let filepath = resolve.apply(null, arguments)
if (/^win/.test(process.platform)) {
filepath = filepath.replace(/\\/g, '\\\\')
}
return filepath
}
const defaults = {