feat(build): Allow building in windows without admin priviledges

Closes #2873
This commit is contained in:
Alfonso Presa
2015-07-04 10:07:19 +02:00
committed by Tobias Bosch
parent f827e1532e
commit f1f578436b
3 changed files with 32 additions and 3 deletions

View File

@ -41,7 +41,11 @@ class DiffingReplace implements DiffingBroccoliPlugin {
});
fs.writeFileSync(destFilePath, content, FILE_ENCODING);
} else if (!fs.existsSync(destFilePath)) {
fs.symlinkSync(sourceFilePath, destFilePath);
try {
fs.symlinkSync(sourceFilePath, destFilePath);
} catch (e) {
fs.writeFileSync(destFilePath, fs.readFileSync(sourceFilePath));
}
}
});