mirror of
https://github.com/kubescape/kubescape.git
synced 2026-02-14 18:09:55 +00:00
Merge pull request #716 from pwnb0y/master
install.ps1 is modified to increase downloading speed as well as show progress bar
This commit is contained in:
12
install.ps1
12
install.ps1
@@ -12,7 +12,17 @@ $fullUrl = $url + $packageName
|
||||
New-Item -Path $BASE_DIR -ItemType "directory" -ErrorAction SilentlyContinue
|
||||
|
||||
# Download the binary
|
||||
Invoke-WebRequest -Uri $fullUrl -OutFile $BASE_DIR\kubescape.exe
|
||||
$useBitTransfer = $null -ne (Get-Module -Name BitsTransfer -ListAvailable) -and ($PSVersionTable.PSVersion.Major -le 5)
|
||||
if ($useBitTransfer)
|
||||
{
|
||||
Write-Information -MessageData 'Using a fallback BitTransfer method since you are running Windows PowerShell'
|
||||
Start-BitsTransfer -Source $fullUrl -Destination $BASE_DIR\kubescape.exe
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Invoke-WebRequest -Uri $fullUrl -OutFile $BASE_DIR\kubescape.exe
|
||||
}
|
||||
|
||||
# Update user PATH if needed
|
||||
$currentPath = [Environment]::GetEnvironmentVariable("Path", "User")
|
||||
|
||||
Reference in New Issue
Block a user