fix: gracefully handle mount failure in legacy dependenciesAutoconfig

Non-legacy dependencies don't have an "embassy" volume, so the mount
fails. Catch the error and skip autoconfig instead of crashing.
This commit is contained in:
Aiden McClelland
2026-03-10 02:55:05 -06:00
parent d2f12a7efc
commit 36b8fda6db

View File

@@ -1116,16 +1116,24 @@ export class SystemForEmbassy implements System {
// TODO: docker
const status = await getStatus(effects, { packageId: id }).const()
if (!status) return
await effects.mount({
location: `/media/embassy/${id}`,
target: {
packageId: id,
volumeId: "embassy",
subpath: null,
readonly: true,
idmap: [],
},
})
try {
await effects.mount({
location: `/media/embassy/${id}`,
target: {
packageId: id,
volumeId: "embassy",
subpath: null,
readonly: true,
idmap: [],
},
})
} catch (e) {
console.error(
`Failed to mount dependency volume for ${id}, skipping autoconfig:`,
e,
)
return
}
configFile
.withPath(`/media/embassy/${id}/config.json`)
.read()