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