modPath utils function

returns modPath from a mod object
This commit is contained in:
2021-01-21 21:38:41 +01:00
parent 54cfb222b9
commit 2d1de103d8
3 changed files with 15 additions and 11 deletions

View File

@ -1,6 +1,7 @@
let mods_lock;
const { http, https } = require('follow-redirects');
const fs = require("fs");
const util = require("./util.js");
let mods_lock;
let downloadStarted = false;
let dep = new Map();
function main() {
@ -104,7 +105,7 @@ function downloadFile(url, dest) {
});
file.on('error', (err) => { // Handle errors
fs.unlink(dest);
fs.unlink(dest, () => {});
throw err;
});
}