Skip to content

Commit

Permalink
Guard against 2 parallel rollups trying to make the same dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Aug 23, 2017
1 parent 224e192 commit 077fd05
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/utils/fs.js
Expand Up @@ -9,7 +9,13 @@ function mkdirpath ( path ) {
fs.readdirSync( dir );
} catch ( err ) {
mkdirpath( dir );
fs.mkdirSync( dir );
try {
fs.mkdirSync( dir );
} catch (err2) {
if (err2.code !== 'EEXIST') {
throw err2;
}
}
}
}

Expand Down

0 comments on commit 077fd05

Please sign in to comment.