an empty Cursor pin should build without Cursor, not fail the build - #567
an empty Cursor pin should build without Cursor, not fail the build#567lroolle wants to merge 1 commit into
Conversation
/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 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec753a4889
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if [ -z "$CURSOR_CLI_VERSION" ]; then | ||
| log "CURSOR_CLI_VERSION is empty; skipping the Cursor CLI" | ||
| return 0 |
There was a problem hiding this comment.
Remove inherited Cursor install when the pin is empty
When buildx-multi-rust is run with an empty CURSOR_CLI_VERSION, Dockerfile.rust inherits MAIN_IMAGE (Makefile:298-303), which may already contain ~/.local/bin/cursor-agent and its version tree, before invoking this installer. Returning without cleanup therefore produces an image labeled with an empty Cursor version while still exposing the inherited, stale binary, so the advertised opt-out does not actually build without Cursor. Remove the inherited link/version directory in this branch, or ensure this path always starts from a Cursor-free base.
Useful? React with 👍 / 👎.
One character
:?rejects empty as well as unset. Cursor is the one CLI in this script with no npm package and no pin hook in its own installer -- the version is parsed out ofcursor.com/install, so any build host that cannot reach cursor.com resolves it to""and the whole image build dies over one optional CLI. Leaving the pin empty is the sane way to say "build this image without Cursor", and:?turned that into a build failure.?instead of:?keeps unset an error, because unset meansversions.envis incomplete rather than deliberate. Empty is now honoured andinstall_cursor_agentreturns early saying so.Verification
All three cases run against the real script, not a toy reproduction (
main "$@"stubbed out soinstall_cursor_agentcan be called on its own):CI on this branch is green on all four jobs, including the Installer Smoke Test that #551 fails. Note what that does and does not prove:
versions.envhere still carriesCURSOR_CLI_VERSION=2026.08.11-e8db854, so CI exercised the pinned path only ---- which shows the change is non-regressive. The empty path is proven by the run above and will get its first CI exercise from whichever change actually empties the pin.
bash -nclean,shellcheck -S warningclean.Why this is its own PR
#551 has been red for 27 days, and this is one of its two failures. Meanwhile main's pins are drifting badly:
34 Claude Code releases behind on a repo whose entire job is running pinned agent CLIs. #551's proposed pins are themselves 8 releases stale now, so it wants a refresh before it lands -- which is easier once it is not also carrying a mechanism fix.
The other failure is
tests/version-upgrade.sh:239, which hardcodesCURSOR_CLI_VERSION=2026.08.11-e8db854as an expected value. That fixture belongs to whichever change empties the pin, so it is deliberately not touched here.Also worth knowing before #551 lands:
scripts/version-upgrade.sh:267counts an empty cursor pin under "Could not determine versions for", somake versions-upwill warn about a variable that is deliberately empty. Cosmetic, but that is how a warning channel gets trained to be ignored. Left alone here because it needs a decision about how the tool distinguishes "unresolvable" from "disabled".#562 and #563 are green and mergeable and have been for 24 days; neither depends on this.
🤖 Generated with Claude Code