From 8450e63b560901e520f2dbb7189c226913f723be Mon Sep 17 00:00:00 2001 From: Dan Guido Date: Wed, 6 Aug 2025 16:35:04 -0700 Subject: [PATCH] Remove unused uv installation code from PowerShell script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PowerShell script is purely a WSL wrapper - it doesn't need to install uv since it just passes execution to WSL/bash where the Unix algo script handles dependency management. Removing dead code that was never called in the execution flow. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- algo.ps1 | 66 -------------------------------------------------------- 1 file changed, 66 deletions(-) diff --git a/algo.ps1 b/algo.ps1 index 20fe84fd..8ab4090c 100644 --- a/algo.ps1 +++ b/algo.ps1 @@ -88,72 +88,6 @@ function Invoke-AlgoInWSL { } } -# Function to install uv via package managers (for WSL scenarios) -function Install-UvViaPackageManager { - Write-Host "Attempting to install uv via system package manager..." - - # Try winget (Windows Package Manager) - if (Get-Command winget -ErrorAction SilentlyContinue) { - Write-Host "Using winget..." - try { - winget install --id=astral-sh.uv -e --silent --accept-source-agreements --accept-package-agreements - return $true - } catch { - Write-Host "winget installation failed: $($_.Exception.Message)" - } - } - - # Try scoop - if (Get-Command scoop -ErrorAction SilentlyContinue) { - Write-Host "Using scoop..." - try { - scoop install uv - return $true - } catch { - Write-Host "scoop installation failed: $($_.Exception.Message)" - } - } - - return $false -} - -# Function to install uv via download (with user consent) -function Install-UvViaDownload { - Write-Host "" - Write-Host "Security Notice: uv is not available via system package managers on this system." - Write-Host "To continue, we need to download and execute an installation script from:" - Write-Host " https://astral.sh/uv/install.ps1 (Windows)" - Write-Host "" - Write-Host "For maximum security, you can install uv manually instead:" - $installUrl = "https://docs.astral.sh/uv/getting-started/installation/" - Write-Host " 1. Visit: $installUrl" - Write-Host " 2. Download the binary for your platform from GitHub releases" - Write-Host " 3. Verify checksums and install manually" - Write-Host " 4. Then run: .\algo.ps1" - Write-Host "" - - $consent = Read-Host "Continue with script download? (y/N)" - if ($consent -ne "y" -and $consent -ne "Y") { - Write-Host "Installation cancelled. Please install uv manually and retry." - exit 1 - } - - Write-Host "Downloading uv installation script..." - try { - Invoke-RestMethod https://github.com/astral-sh/uv/releases/download/0.8.5/uv-installer.ps1 | Invoke-Expression - return $true - } catch { - Write-Host "Error downloading or executing uv installer: $($_.Exception.Message)" - return $false - } -} - -# Function to refresh PATH environment variable -function Update-PathEnvironment { - $env:PATH = [System.Environment]::GetEnvironmentVariable("PATH", "Machine") + ";" + - [System.Environment]::GetEnvironmentVariable("PATH", "User") -} - # Main execution try { # Check if we're actually running inside WSL