From b72e902b3690813aa8141f32014642b7d032bb85 Mon Sep 17 00:00:00 2001 From: Ricardo Barbosa <3788982+nextlevelbeard@users.noreply.github.com> Date: Fri, 13 May 2022 13:09:41 +0100 Subject: [PATCH] feat: Allow single zip bundle to contain multiple app SDK builds chore: Lint changes --- lib/basedriver/helpers.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/basedriver/helpers.js b/lib/basedriver/helpers.js index 99662fbbe..5a51140a3 100644 --- a/lib/basedriver/helpers.js +++ b/lib/basedriver/helpers.js @@ -279,8 +279,13 @@ async function configureApp (app, supportedAppExtensions) { if (archivePath !== app) { await fs.rimraf(archivePath); } - logger.info(`Will reuse previously cached application at '${fullPath}'`); - return verifyAppExtension(fullPath, supportedAppExtensions); + logger.info(`Will try to reuse previously cached application at '${fullPath}'`); + try { + return verifyAppExtension(fullPath, supportedAppExtensions); + } catch (err) { + logger.warn(`Cached applicattion '${fullPath}' does not have ${util.pluralize('extension', supportedAppExtensions.length, false)} '${supportedAppExtensions}', will look for app in archive '${archivePath}'`); + return archivePath; + } } logger.info(`The application at '${fullPath}' does not exist anymore ` + `or its integrity has been damaged. Deleting it from the cache`);