From 885057a7b8997fb23f26fce6af738c02ce8982b6 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 --- lib/basedriver/helpers.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/basedriver/helpers.js b/lib/basedriver/helpers.js index 99662fbbe..44bf57e36 100644 --- a/lib/basedriver/helpers.js +++ b/lib/basedriver/helpers.js @@ -279,8 +279,14 @@ 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 ${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`);