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,6 +1116,7 @@ export class SystemForEmbassy implements System {
// TODO: docker // TODO: docker
const status = await getStatus(effects, { packageId: id }).const() const status = await getStatus(effects, { packageId: id }).const()
if (!status) return if (!status) return
try {
await effects.mount({ await effects.mount({
location: `/media/embassy/${id}`, location: `/media/embassy/${id}`,
target: { target: {
@@ -1126,6 +1127,13 @@ export class SystemForEmbassy implements System {
idmap: [], idmap: [],
}, },
}) })
} catch (e) {
console.error(
`Failed to mount dependency volume for ${id}, skipping autoconfig:`,
e,
)
return
}
configFile configFile
.withPath(`/media/embassy/${id}/config.json`) .withPath(`/media/embassy/${id}/config.json`)
.read() .read()