Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion scripts/install-agent-tooling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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
Comment on lines +336 to +338

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 馃憤聽/ 馃憥.

fi

ensure_safe_cwd
mkdir -p "$DEVA_HOME/.local/bin"

Expand Down
Loading