Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't set SSL_CERT_FILE in uvx shim #1376

Merged
merged 1 commit into from
Feb 25, 2025
Merged
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
24 changes: 3 additions & 21 deletions ui/desktop/src/bin/uvx
Original file line number Diff line number Diff line change
Expand Up @@ -67,36 +67,18 @@ log "uv: $(which uv)"
log "uvx: $(which uvx)"


log "Checking for GOOSE_UV_REGISTRY and GOOSE_UV_CERT environment variables for custom python/pip/UV registry setup..."
log "Checking for GOOSE_UV_REGISTRY environment variable for custom python/pip/UV registry setup..."
# Check if GOOSE_UV_REGISTRY is set and accessible
if [ -n "${GOOSE_UV_REGISTRY:-}" ] && curl -s --head --fail "$GOOSE_UV_REGISTRY" > /dev/null; then
log "Checking custom goose registry availability: $GOOSE_UV_REGISTRY"
log "$GOOSE_UV_REGISTRY is accessible. Using it for UV registry."
log "$GOOSE_UV_REGISTRY is accessible, setting it as UV_INDEX_URL. Setting UV_NATIVE_TLS to true."
export UV_INDEX_URL="$GOOSE_UV_REGISTRY"

if [ -n "${GOOSE_UV_CERT:-}" ] && curl -s --head --fail "$GOOSE_UV_CERT" > /dev/null; then
log "Downloading certificate from: $GOOSE_UV_CERT"
curl -sSL -o ~/.config/goose/mcp-hermit/cert.pem "$GOOSE_UV_CERT"
if [ $? -eq 0 ]; then
log "Certificate downloaded successfully."
export SSL_CERT_FILE=~/.config/goose/mcp-hermit/cert.pem
else
log "Unable to download the certificate. Skipping certificate setup."
fi
else
log "GOOSE_UV_CERT is either not set or not accessible. Skipping certificate setup."
fi

export UV_NATIVE_TLS=true
else
log "GOOSE_UV_REGISTRY is either not set or not accessible. Falling back to default pip registry."
export UV_INDEX_URL="https://pypi.org/simple"
fi






# Final step: Execute uvx with passed arguments
log "Executing 'uvx' command with arguments: $*"
uvx "$@" || log "Failed to execute 'uvx' with arguments: $*"
Expand Down
Loading