From b66d069c1de15892e1f81d860f5516777f797714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Mon, 20 Sep 2021 10:44:34 +0200 Subject: [PATCH] catch esrp errors related to #133316 --- build/azure-pipelines/common/sign.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines/common/sign.ts b/build/azure-pipelines/common/sign.ts index e03682deb4b..27d625674ba 100644 --- a/build/azure-pipelines/common/sign.ts +++ b/build/azure-pipelines/common/sign.ts @@ -76,9 +76,16 @@ export function main([esrpCliPath, type, cert, username, password, folderPath, p '-e', keyFile, ]; - cp.spawnSync('dotnet', args, { stdio: 'inherit' }); + try { + cp.execFileSync('dotnet', args, { stdio: 'inherit' }); + } catch (err) { + console.error('ESRP failed'); + console.error(err); + process.exit(1); + } } if (require.main === module) { main(process.argv.slice(2)); + process.exit(0); }