Skip to content

Commit 674c01c

Browse files
author
Tobias Brennecke
committed
Fix #629 Race condition when loading starter kits
1 parent 6e885cb commit 674c01c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

core/lib/starterkit_manager.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ var starterkit_manager = function (config) {
3636
console.log('Overwriting contents of', paths.source.root, 'during starterkit load.');
3737
}
3838

39-
fs.copy(kitPath, paths.source.root, function (ex) {
40-
if (ex) {
41-
console.error(ex);
42-
}
43-
util.debug('starterkit ' + starterkitName + ' loaded successfully.');
44-
});
39+
try {
40+
fs.copySync(kitPath, paths.source.root);
41+
} catch (ex) {
42+
util.error(ex);
43+
return;
44+
}
45+
util.debug('starterkit ' + starterkitName + ' loaded successfully.');
4546
}
4647
} catch (ex) {
4748
console.log(ex);

0 commit comments

Comments
 (0)