diff --git a/packages/uni-migration/lib/index.js b/packages/uni-migration/lib/index.js index 06183ec3452a2d70090444c095805a32bdd98294..2502a80c6be0b7229e27def83c9be8cf9ba4b0a0 100644 --- a/packages/uni-migration/lib/index.js +++ b/packages/uni-migration/lib/index.js @@ -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)}`)