From ec753a48894cba3f58691ca48435a8e2cca115f8 Mon Sep 17 00:00:00 2001 From: lroolle Date: Tue, 8 Sep 2026 23:38:23 -0700 Subject: [PATCH] an empty Cursor pin should build without Cursor, not fail the build /tmp/install-agent-tooling.sh: line 15: CURSOR_CLI_VERSION: CURSOR_CLI_VERSION is required `: "${CURSOR_CLI_VERSION:?...}"` rejects empty as well as unset. Cursor is the one CLI here with no npm package and no pin hook in its own installer: the version comes from parsing cursor.com/install, so a build host that cannot reach cursor.com resolves it to "" and the entire image build dies over one optional CLI. Leaving the pin empty is the sane way to say "build without it", and `:?` turned that into a failure. `?` instead of `:?`: unset is still an error, because that means versions.env is incomplete rather than deliberate. Empty is now honoured, and install_cursor_agent returns early with a log line saying why. unset -> CURSOR_CLI_VERSION is required (set it empty to build without ...) "" -> CURSOR_CLI_VERSION is empty; skipping the Cursor CLI pinned -> Installing Cursor CLI pinned to 2026.08.11-e8db854 This is one of the two failures on #551, which has been red for 27 days while main's Claude Code pin fell 34 releases behind upstream (2.1.232 vs 2.1.266). The other is tests/version-upgrade.sh, which hardcodes CURSOR_CLI_VERSION=2026.08.11-e8db854 as an expectation; that fixture belongs to whichever change empties the pin. Co-Authored-By: Claude Opus 5 --- scripts/install-agent-tooling.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/install-agent-tooling.sh b/scripts/install-agent-tooling.sh index f58da58..1d360cf 100644 --- a/scripts/install-agent-tooling.sh +++ b/scripts/install-agent-tooling.sh @@ -12,7 +12,13 @@ set -euo pipefail : "${OPENCODE_VERSION:?OPENCODE_VERSION is required}" : "${PI_CODING_AGENT_VERSION:?PI_CODING_AGENT_VERSION is required}" : "${DSH_VERSION:?DSH_VERSION is required}" -: "${CURSOR_CLI_VERSION:?CURSOR_CLI_VERSION is required}" +# `?` and not `:?`: Cursor is the one CLI here with no npm package and no pin +# hook in its own installer, so an image that does not want it says so by +# leaving the pin empty. `:?` rejects empty as well as unset, which turned +# "disabled" into a build failure -- #551 has been red for a month on this one +# character. Unset is still an error, because that means versions.env is +# incomplete rather than deliberate. +: "${CURSOR_CLI_VERSION?CURSOR_CLI_VERSION is required (set it empty to build without the Cursor CLI)}" CCTRACE_VERSION="${CCTRACE_VERSION:-0.4.0}" CCX_VERSION="${CCX_VERSION:-v0.7.0}" @@ -327,6 +333,11 @@ install_ccx() { # Only the `cursor-agent` bin name is linked; the official installer also # squats `agent`, which is too generic for a container with nine CLIs. install_cursor_agent() { + if [ -z "$CURSOR_CLI_VERSION" ]; then + log "CURSOR_CLI_VERSION is empty; skipping the Cursor CLI" + return 0 + fi + ensure_safe_cwd mkdir -p "$DEVA_HOME/.local/bin"