You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.warn('Removing item at downloadLocation:',downloadLocation,'so the MySQL binary archive can be stored there. This is probably because a previous download/extraction failed.');
logger.warn('Removing item at extractedLocation:',extractedLocation,'so the MySQL binary can be stored there. This is probably because a previous download/extraction failed.');
@@ -167,7 +191,8 @@ function extractBinary(url, archiveLocation, extractedLocation, logger) {
167
191
resolve(`${extractedLocation}/mysql/bin/mysqld`);
168
192
}
169
193
}).catch(error=>{
170
-
reject(`An error occurred while extracting the tar file. Please make sure tar is installed and there is enough storage space for the extraction. The error was: ${error}`);
194
+
logger.error(`An error occurred while extracting the tar file. Please make sure tar is installed and there is enough storage space for the extraction. The error was: ${error}`);
195
+
reject(error);
171
196
});
172
197
});
173
198
}
@@ -190,8 +215,7 @@ function downloadBinary(binaryInfo, options, logger) {
logger.error('An error occurred while unlocking path:',e);
254
+
logger.error('An error occurred while deleting extractedPath and/or archivePath:',e);
255
+
}
256
+
if(downloadTries>=options.downloadRetries){
257
+
//Only reject if we have met the downloadRetries limit
258
+
try{
259
+
releaseFunction();
260
+
}
261
+
catch(e){
262
+
logger.error('An error occurred while releasing lock after downloadRetries exhaustion. The error was:',e);
263
+
}
264
+
logger.error('downloadRetries have been exceeded. Aborting download.');
265
+
returnreject(e);
266
+
}
267
+
else{
268
+
console.warn(`An error was encountered during the binary download process. Retrying for retry ${downloadTries}/${options.downloadRetries}. The error was:`,e);
233
269
}
234
-
returnreject(e);
235
270
}
236
-
}
271
+
}while(downloadTries<options.downloadRetries);
237
272
try{
238
273
releaseFunction();
239
274
}
240
275
catch(e){
241
-
returnreject(e);
276
+
logger.error('An error occurred while releasing lock after successful binary download. The error was:',e);
logger.error('An error occurred while deleting extractedPath and/or archivePath:',e);
303
+
}
304
+
if(downloadTries>=options.downloadRetries){
305
+
//Only reject if we have met the downloadRetries limit
306
+
returnreject(e);
307
+
}
308
+
else{
309
+
console.warn(`An error was encountered during the binary download process. Retrying for retry ${downloadTries}/${options.downloadRetries}. The error was:`,e);
0 commit comments