mirror of
https://github.com/trailofbits/algo.git
synced 2025-09-03 10:33:13 +02:00
Remove unused uv installation code from PowerShell script
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 <noreply@anthropic.com>
This commit is contained in:
parent
9313cc22f2
commit
8450e63b56
1 changed files with 0 additions and 66 deletions
66
algo.ps1
66
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
|
||||
|
|
Loading…
Add table
Reference in a new issue