Try harder to create .meteor/dev_bundle symlink.

May help with #7391.
This commit is contained in:
Ben Newman
2016-07-12 11:40:42 -04:00
parent cfac635a62
commit ea236fc9da

View File

@@ -13,7 +13,13 @@ exports.makeLink = function (target, linkPath) {
fs.writeFileSync(tempPath, target, "utf8");
}
fs.renameSync(tempPath, linkPath);
try {
fs.renameSync(tempPath, linkPath);
} catch (e) {
// If renaming fails, try unlinking first.
fs.unlinkSync(linkPath);
fs.renameSync(tempPath, linkPath);
}
};
exports.readLink = function (linkPath) {