Skip to content

Commit 310ff3e

Browse files
committed
Handle error when module is unavailable
1 parent 3b49195 commit 310ff3e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/vs/platform/extensionManagement/node/extensionSignatureVerificationService.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ export class ExtensionSignatureVerificationService implements IExtensionSignatur
5757
}
5858

5959
public async verify(vsixFilePath: string, signatureArchiveFilePath: string): Promise<boolean> {
60-
const vsceSign = await this.vsceSign();
60+
let module: typeof vsceSign;
6161

62-
if (!vsceSign) {
62+
try {
63+
module = await this.vsceSign();
64+
} catch (error) {
6365
return false;
6466
}
6567

66-
return vsceSign.verify(vsixFilePath, signatureArchiveFilePath);
68+
return module.verify(vsixFilePath, signatureArchiveFilePath);
6769
}
6870
}

0 commit comments

Comments
 (0)