2021-12-10 18:29:52 +00:00
|
|
|
// Minimal wrapper mimicking mkdirp package
|
|
|
|
exports.__esModule = true; // Makes moduleUpdater internals load properly
|
|
|
|
|
|
|
|
const fs = require('fs');
|
|
|
|
|
|
|
|
|
|
|
|
const async = (path, callback) => { // async
|
|
|
|
log('Mkdirp', 'Async:', path);
|
|
|
|
|
2021-12-11 08:23:29 +00:00
|
|
|
fs.mkdir(path, { recursive: true }, () => { // Ignore errors (already exists)
|
2021-12-10 20:00:24 +00:00
|
|
|
callback();
|
2021-12-11 08:23:29 +00:00
|
|
|
});
|
2021-12-10 18:29:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const sync = (path) => { // sync
|
|
|
|
log('Mkdirp', 'Sync:', path);
|
|
|
|
|
|
|
|
try {
|
|
|
|
fs.mkdirSync(path, { recursive: true });
|
2021-12-10 20:00:24 +00:00
|
|
|
} catch (e) { } // Already exists, ignore
|
2021-12-10 18:29:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const toExport = async;
|
|
|
|
toExport.sync = sync;
|
|
|
|
|
|
|
|
exports.default = toExport;
|