fix(cleanVm): handle broken-er alias

This commit is contained in:
Florent BEAUCHAMP
2023-07-04 14:00:37 +02:00
parent 4e125ede88
commit 391c778515

View File

@@ -123,7 +123,9 @@ export async function checkAliases(
) {
const aliasFound = []
for (const alias of aliasPaths) {
const target = await resolveVhdAlias(handler, alias)
let target
try {
target = await resolveVhdAlias(handler, alias)
if (!isVhdFile(target)) {
logWarn('alias references non VHD target', { alias, target })
@@ -134,8 +136,6 @@ export async function checkAliases(
}
continue
}
try {
const { dispose } = await openVhd(handler, target)
try {
await dispose()