Skip to content

Commit

Permalink
Merge pull request react-bootstrap#714 from react-bootstrap/handle-ra…
Browse files Browse the repository at this point in the history
…ce-condition

Handle race condition with creation of babel-cache directory
  • Loading branch information
AlexKVal committed May 21, 2015
2 parents 4ffa55b + fc0c1c3 commit 39f8285
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion webpack/base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ import yargs from 'yargs';
const babelCache = path.resolve(path.join(__dirname, '../.babel-cache'));

if (!fs.existsSync(babelCache)) {
fs.mkdirSync(babelCache);
try {
fs.mkdirSync(babelCache);
} catch (err) {
if (err.code !== 'EEXIST') {
console.error(err.stack);
}
}
}

export const options = yargs
Expand Down

0 comments on commit 39f8285

Please sign in to comment.