Skip to content

Commit

Permalink
fix silent install
Browse files Browse the repository at this point in the history
  • Loading branch information
LemonHX committed Apr 14, 2022
1 parent 3f53b06 commit 9a7e729
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions scripts/dev_setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,13 @@ function install_build_tools {
Write-Host "Installing..."
cmd /c start /wait $exePath /S
Write-Host "Installed" -ForegroundColor Green
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\LLVM\bin", 'User')
}
try {
dotnet 2>&1>$null
} catch {
Write-Error "Dotnet sdk not found, installing dotnet sdk!"
$exePath = "$env:temp\dotnet-sdk-6.0.202-win-x64.exe"
Invoke-WebRequest -Uri "https://download.visualstudio.microsoft.com/download/pr/e4f4bbac-5660-45a9-8316-0ffc10765179/8ade57de09ce7f12d6411ed664f74eca/dotnet-sdk-6.0.202-win-x64.exe" -OutFile $exePath
Write-Host "Installing..."
cmd /c start /wait $exePath /S
Write-Host "Installed" -ForegroundColor Green
throw "please install manually"
}
try {
cargo 2>&1>$null
Expand All @@ -116,8 +113,9 @@ function install_build_tools {
$exePath = "$env:temp\rust-init.exe"
Invoke-WebRequest -Uri "https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe" -OutFile $exePath
Write-Host "Installing..."
cmd /c start /wait $exePath /S
Write-Host "Installed" -ForegroundColor Green
cmd /c start /wait $exePath -y
Write-Host "Rust installed" -ForegroundColor Green
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$env:USERPROFILE\.cargo\bin", 'User')
}
}

Expand Down

0 comments on commit 9a7e729

Please sign in to comment.