提交 32aef497 编写于 作者: fxy060608's avatar fxy060608

fix(v3): Source and destination must not be the same

上级 360c6f5f
......@@ -39,7 +39,11 @@ module.exports = function migrate(input, out, options = {}) {
)
) {
options.silent !== true && console.log(`copy: ${dest}`)
src !== dest && fs.copySync(src, dest)
try {
fs.copySync(src, dest)
} catch (e) {
//ignore Source and destination must not be the same
}
}
} else {
options.silent !== true && console.log(`write: ${path.resolve(out, asset.path)}`)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册