Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,13 @@ program
);
console.log(`Fingerprint: ${result.fingerprint}`);
} else {
console.error(`ERROR: Extension is not signed`);
const errorMessage =
result.status === "unsigned"
? "Extension is not signed"
: result.status === "invalid"
? "Signature is invalid"
: "Signature is valid, but the certificate is not trusted";
console.error(`ERROR: ${errorMessage}`);
process.exit(1);
}
} catch (error) {
Expand Down Expand Up @@ -330,8 +336,14 @@ program
);
console.log(` Fingerprint: ${signatureInfo.fingerprint}`);
console.log(` Status: Valid (self-signed)`);
} else {
} else if (signatureInfo.status === "unsigned") {
console.log(`\nWARNING: Not signed`);
} else if (signatureInfo.status === "invalid") {
console.log(`\nWARNING: Signature is invalid`);
} else {
console.log(
`\nWARNING: Signature is valid, but the certificate is not trusted`,
);
}
} catch (error) {
console.log(
Expand Down
Loading