From 49219314e5c4df310155d1b5ec9862cc38cf56f8 Mon Sep 17 00:00:00 2001 From: Claude Code Bot Date: Wed, 21 Oct 2026 08:49:00 -0700 Subject: [PATCH] test(digest): unset an exported gh function in the upsert test The test failed locally inside a Claude Code session and passed in CI. The session exports a gh shell function (BASH_FUNC_gh%%), which child shells inherit through the environment and which shadows the stub on PATH. Its approval gate then refused the stubbed issue writes. The existing `unset BASH_ENV` does not cover this path. --- scripts/dependabot-digest/tests/test-upsert-issue.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/dependabot-digest/tests/test-upsert-issue.sh b/scripts/dependabot-digest/tests/test-upsert-issue.sh index fb26186..54d971d 100755 --- a/scripts/dependabot-digest/tests/test-upsert-issue.sh +++ b/scripts/dependabot-digest/tests/test-upsert-issue.sh @@ -13,6 +13,8 @@ set -uo pipefail unset CDPATH unset BASH_ENV GH_TOKEN GH_HOST GITHUB_TOKEN +# An exported gh function shadows the stub; Claude Code sessions export one. +unset -f gh HERE="$(CDPATH='' cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" DIR="${HERE}/.."