mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
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:
@@ -1116,16 +1116,24 @@ 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
|
||||||
await effects.mount({
|
try {
|
||||||
location: `/media/embassy/${id}`,
|
await effects.mount({
|
||||||
target: {
|
location: `/media/embassy/${id}`,
|
||||||
packageId: id,
|
target: {
|
||||||
volumeId: "embassy",
|
packageId: id,
|
||||||
subpath: null,
|
volumeId: "embassy",
|
||||||
readonly: true,
|
subpath: null,
|
||||||
idmap: [],
|
readonly: true,
|
||||||
},
|
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()
|
||||||
|
|||||||
Reference in New Issue
Block a user