Skip to content

Commit

Permalink
style(MongoBinaryDownload): rename error variables from "e" to "err"
Browse files Browse the repository at this point in the history
to be consistent with other code
  • Loading branch information
hasezoey committed Aug 22, 2022
1 parent 2c9c6fe commit 4bc2b22
Showing 1 changed file with 9 additions and 9 deletions.
Expand Up @@ -363,9 +363,9 @@ export class MongoBinaryDownload {
log('extractZip');

return new Promise((resolve, reject) => {
yauzl.open(mongoDBArchive, { lazyEntries: true }, (e, zipfile) => {
if (e || !zipfile) {
return reject(e);
yauzl.open(mongoDBArchive, { lazyEntries: true }, (err, zipfile) => {
if (err || !zipfile) {
return reject(err);
}

zipfile.readEntry();
Expand All @@ -377,9 +377,9 @@ export class MongoBinaryDownload {
return zipfile.readEntry();
}

zipfile.openReadStream(entry, (e, r) => {
if (e || !r) {
return reject(e);
zipfile.openReadStream(entry, (err2, r) => {
if (err2 || !r) {
return reject(err2);
}

r.on('end', () => zipfile.readEntry());
Expand Down Expand Up @@ -476,10 +476,10 @@ export class MongoBinaryDownload {
this.printDownloadProgress(chunk);
});
})
.on('error', (e: Error) => {
.on('error', (err: Error) => {
// log it without having debug enabled
console.error(`Couldnt download "${downloadUrl}"!`, e.message);
reject(e);
console.error(`Couldnt download "${downloadUrl}"!`, err.message);
reject(err);
});
});
}
Expand Down

0 comments on commit 4bc2b22

Please sign in to comment.