mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-15 07:28:05 +00:00
chore: log keychain details when signing fails (#255799)
* chore: log available identities when signing fails * chore: dump keychain used for signing
This commit is contained in:
@@ -108,8 +108,16 @@ async function main(buildDir) {
|
||||
await electron_osx_sign_1.default.signAsync(appOpts);
|
||||
}
|
||||
if (require.main === module) {
|
||||
main(process.argv[2]).catch(err => {
|
||||
main(process.argv[2]).catch(async (err) => {
|
||||
console.error(err);
|
||||
const identities = await (0, cross_spawn_promise_1.spawn)('security', ['find-identity', '-p', 'codesigning', '-v']);
|
||||
console.error(`Available identities:\n${identities}`);
|
||||
const tempDir = process.env['AGENT_TEMPDIRECTORY'];
|
||||
if (tempDir) {
|
||||
const keychain = path_1.default.join(tempDir, 'buildagent.keychain');
|
||||
const dump = await (0, cross_spawn_promise_1.spawn)('security', ['dump-keychain', keychain]);
|
||||
console.error(`Keychain dump:\n${dump}`);
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -118,8 +118,16 @@ async function main(buildDir?: string): Promise<void> {
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
main(process.argv[2]).catch(err => {
|
||||
main(process.argv[2]).catch(async err => {
|
||||
console.error(err);
|
||||
const identities = await spawn('security', ['find-identity', '-p', 'codesigning', '-v']);
|
||||
console.error(`Available identities:\n${identities}`);
|
||||
const tempDir = process.env['AGENT_TEMPDIRECTORY'];
|
||||
if (tempDir) {
|
||||
const keychain = path.join(tempDir, 'buildagent.keychain');
|
||||
const dump = await spawn('security', ['dump-keychain', keychain]);
|
||||
console.error(`Keychain dump:\n${dump}`);
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user