From 62e6957f68d2b6a3c61cad7b3d894c7b8c25b917 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 24 Jul 2019 10:55:16 -0700 Subject: [PATCH] spec: don't run codesigning spec on forks (#19418) --- spec-main/api-autoupdater-darwin-spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec-main/api-autoupdater-darwin-spec.ts b/spec-main/api-autoupdater-darwin-spec.ts index c2c43e83d989..25cd47e5d2c2 100644 --- a/spec-main/api-autoupdater-darwin-spec.ts +++ b/spec-main/api-autoupdater-darwin-spec.ts @@ -22,7 +22,9 @@ describeFn('autoUpdater behavior', function () { beforeEach(function () { const result = cp.spawnSync(path.resolve(__dirname, '../script/codesign/get-trusted-identity.sh')) if (result.status !== 0 || result.stdout.toString().trim().length === 0) { - if (isCI) { + // Per https://circleci.com/docs/2.0/env-vars: + // CIRCLE_PR_NUMBER is only present on forked PRs + if (isCI && !process.env.CIRCLE_PR_NUMBER) { throw new Error('No valid signing identity available to run autoUpdater specs') } this.skip()