From b461e89f08b88e90b10224eb06893653cdea6ac2 Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Fri, 21 Nov 2025 11:14:00 +0000 Subject: [PATCH] fix(setup): improve conditional checks for optional package installations --- scripts/bootstrap | 1 + scripts/setup | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index c276950..6cedd13 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -20,6 +20,7 @@ fi if [ ! -d "$HOME/.venv" ]; then echo "==> Creating virtual environment..." uv venv "$HOME/.venv" + ln -s "$HOME/.venv/" .venv fi # shellcheck source=/dev/null . "$HOME/.venv/bin/activate" diff --git a/scripts/setup b/scripts/setup index ef534ea..92535fc 100755 --- a/scripts/setup +++ b/scripts/setup @@ -7,7 +7,7 @@ set -e cd "$(dirname "$0")/.." # Install optional pyright for type checking -if command -v npm >/dev/null 2>&1; then +if command -v npm >/dev/null 2>&1 && ! command -v pyright >/dev/null 2>&1; then echo "==> Installing pyright for type checking..." npm install -g pyright 2>/dev/null || { echo " ⚠️ Warning: pyright installation failed (optional)" @@ -16,7 +16,7 @@ if command -v npm >/dev/null 2>&1; then fi # Install optional release note backend: GitHub Copilot CLI (AI-powered) -if command -v npm >/dev/null 2>&1; then +if command -v npm >/dev/null 2>&1 && ! command -v copilot >/dev/null 2>&1; then echo "==> Installing GitHub Copilot CLI for AI-powered release notes..." npm install -g @github/copilot 2>/dev/null || { echo " ⚠️ Warning: GitHub Copilot CLI installation failed (optional)" @@ -25,7 +25,7 @@ if command -v npm >/dev/null 2>&1; then fi # Install optional release note backend: git-cliff (template-based) -if command -v cargo >/dev/null 2>&1; then +if command -v cargo >/dev/null 2>&1 && ! command -v git-cliff >/dev/null 2>&1; then echo "==> Installing git-cliff for template-based release notes..." cargo install git-cliff || { echo " ⚠️ Warning: git-cliff installation failed (optional)"