Skip to content

Commit d2c9371

Browse files
committedMay 14, 2019
If folder exists, dont try to create it again
1 parent 9f6efb7 commit d2c9371

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎binstall.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ function untgz(url, path, options) {
4242
reject("Error decompressing " + url + " " + error);
4343
});
4444

45-
fs.mkdirSync(path);
45+
if (!fs.existsSync(path)) {
46+
fs.mkdirSync(path);
47+
}
4648

4749
request
4850
.get(url, function(error, response) {

0 commit comments

Comments
 (0)
Please sign in to comment.