From 25eb3ca262e0a2bff842e8eff78284f0723faa42 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Wed, 21 Dec 2022 06:47:21 -0500 Subject: [PATCH] Switch to a variable observed in practice There is apparently no CIRCLE_PR_REPONAME set in the runtime environment, either, despite what the docs say. --- .circleci/lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/lib.sh b/.circleci/lib.sh index cc7ce5e97..7717cdb18 100644 --- a/.circleci/lib.sh +++ b/.circleci/lib.sh @@ -7,7 +7,7 @@ function cache_if_able() { # We can only *push* to it if we have a CACHIX_AUTH_TOKEN, though. # in-repo jobs will get this from CircleCI configuration but jobs from # forks may not. - echo "Building PR from repo: ${CIRCLE_PR_REPONAME}" + echo "Building PR from user/org: ${CIRCLE_PROJECT_USERNAME}" if [ -v CACHIX_AUTH_TOKEN ]; then echo "Cachix credentials present; will attempt to write to cache." cachix watch-exec "${CACHIX_NAME}" -- "$@" @@ -15,7 +15,7 @@ function cache_if_able() { # If we're building a from a forked repository then we're allowed to # not have the credentials (but it's also fine if the owner of the # fork supplied their own). - if [ "${CIRCLE_PR_REPONAME}" == "https://github.com/tahoe-lafs/tahoe-lafs" ]; then + if [ "${CIRCLE_PROJECT_USERNAME}" == "tahoe-lafs" ]; then echo "Required credentials (CACHIX_AUTH_TOKEN) are missing." return 1 else