adding path variable

This commit is contained in:
Martin McKeaveney 2022-08-25 11:07:35 +01:00
parent d5c2f32df3
commit 4aa99336d7
1 changed files with 7 additions and 3 deletions

View File

@ -286,14 +286,18 @@ exports.getComponentLibraryManifest = async library => {
} }
let resp let resp
let path
try { try {
// Try to load the manifest from the new file location // Try to load the manifest from the new file location
const path = join(appId, filename) path = join(appId, filename)
resp = await retrieve(ObjectStoreBuckets.APPS, path) resp = await retrieve(ObjectStoreBuckets.APPS, path)
} catch (error) { } catch (error) {
console.error(`component-manifest-objectstore=failed appId=${appId}`, error) console.error(
`component-manifest-objectstore=failed appId=${appId} path=${path}`,
error
)
// Fallback to loading it from the old location for old apps // Fallback to loading it from the old location for old apps
const path = join(appId, "node_modules", library, "package", filename) path = join(appId, "node_modules", library, "package", filename)
resp = await retrieve(ObjectStoreBuckets.APPS, path) resp = await retrieve(ObjectStoreBuckets.APPS, path)
} }
if (typeof resp !== "string") { if (typeof resp !== "string") {