Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ jobs:
export HOME="$(mktemp -d)"
export PATH="$HOME/.local/bin:$PATH"
export DEVA_INSTALL_BASE_URL="file://$PWD"
export DEVA_DOCKER_IMAGE="deva-smoke:ci"
export DEVA_DOCKER_IMAGE="deva-smoke"
export DEVA_DOCKER_TAG="ci"
export DEVA_DOCKER_IMAGE_FALLBACK=""
export DEVA_NO_DOCKER=1

Expand Down
42 changes: 40 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ set -euo pipefail
DEVA_LAUNCHER="deva.sh"
LEGACY_WRAPPER="claude.sh"
YOLO_WRAPPER="claude-yolo"
DOCKER_IMAGE="${DEVA_DOCKER_IMAGE:-ghcr.io/thevibeworks/deva:latest}"
DOCKER_IMAGE_FALLBACK="${DEVA_DOCKER_IMAGE_FALLBACK:-thevibeworks/deva:latest}"
INSTALL_BASE_URL="${DEVA_INSTALL_BASE_URL:-https://raw.githubusercontent.com/thevibeworks/deva/main}"

agent_files=(
Expand All @@ -15,6 +13,46 @@ agent_files=(
"shared_auth.sh"
)

image_ref() {
local repo="$1"
local tag="${2:-}"
local default_tag="$3"
local tail="${repo##*/}"

if [[ "$repo" == *@* ]]; then
printf '%s' "$repo"
return
fi

if [ -n "$tag" ]; then
printf '%s:%s' "$repo" "$tag"
return
fi

if [[ "$tail" == *:* ]]; then
printf '%s' "$repo"
return
fi
Comment on lines +27 to +35
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

image_ref appends :$tag before checking whether repo already contains a tag (via tail containing :). If DEVA_DOCKER_IMAGE is already tagged (e.g. deva-smoke:ci) and DEVA_DOCKER_TAG is also set, this will produce an invalid ref like deva-smoke:ci:ci. Consider detecting an existing tag first (or stripping it) when a separate tag is provided, and define clear precedence between an inline tag and DEVA_DOCKER_TAG to avoid generating invalid image refs.

Copilot uses AI. Check for mistakes.

printf '%s:%s' "$repo" "$default_tag"
}

if [ -n "${DEVA_DOCKER_IMAGE+x}" ]; then
DOCKER_IMAGE="$(image_ref "$DEVA_DOCKER_IMAGE" "${DEVA_DOCKER_TAG:-}" "latest")"
Comment on lines +40 to +41
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 Treat empty DEVA_DOCKER_IMAGE as unset

If DEVA_DOCKER_IMAGE is present but empty (a common outcome of templated .env files), this branch still treats it as configured and calls image_ref with an empty repo, which produces :latest; the subsequent docker image inspect/docker pull then fails with an invalid image reference. Prior to this commit, ${DEVA_DOCKER_IMAGE:-...} fell back to the default image for empty values, so this is a regression in installer behavior for blank env configuration.

Useful? React with 👍 / 👎.

else
DOCKER_IMAGE="$(image_ref "ghcr.io/thevibeworks/deva" "${DEVA_DOCKER_TAG:-}" "latest")"
fi
Comment on lines +40 to +44
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

The DEVA_DOCKER_IMAGE presence check uses ${DEVA_DOCKER_IMAGE+x}, so an explicitly-empty DEVA_DOCKER_IMAGE will be treated as set and passed to image_ref, resulting in an invalid image like :latest. Previously, an empty value would fall back to the default image via ${VAR:-default}. Consider treating empty DEVA_DOCKER_IMAGE the same as unset (e.g., check -n "${DEVA_DOCKER_IMAGE:-}"), or validate and error with a clear message.

Copilot uses AI. Check for mistakes.

if [ -n "${DEVA_DOCKER_IMAGE_FALLBACK+x}" ]; then
if [ -n "$DEVA_DOCKER_IMAGE_FALLBACK" ]; then
DOCKER_IMAGE_FALLBACK="$(image_ref "$DEVA_DOCKER_IMAGE_FALLBACK" "${DEVA_DOCKER_IMAGE_FALLBACK_TAG:-${DEVA_DOCKER_TAG:-}}" "latest")"
else
DOCKER_IMAGE_FALLBACK=""
fi
else
DOCKER_IMAGE_FALLBACK="$(image_ref "thevibeworks/deva" "${DEVA_DOCKER_IMAGE_FALLBACK_TAG:-${DEVA_DOCKER_TAG:-}}" "latest")"
fi

echo "deva installer"
echo "=============="
echo ""
Expand Down
Loading