mirror of
https://github.com/Baipyrus/ProxySwitcher.git
synced 2024-12-27 05:01:45 +00:00
specifying download path directly on Invoke-RestMethod
This commit is contained in:
parent
231a5101d7
commit
e06b22622e
@ -40,12 +40,15 @@ if ($isRelease)
|
|||||||
Copy-Item -Path "$releaseDir\*" -Destination $programPath -Recurse -Force
|
Copy-Item -Path "$releaseDir\*" -Destination $programPath -Recurse -Force
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
# Specify temporary output Path
|
||||||
|
$tmpPRSWzip = "$env:TMP\ProxySwitcher.zip"
|
||||||
|
|
||||||
# Download release files from github as-is
|
# Download release files from github as-is
|
||||||
Write-Host "Downloading program into local directory..." -ForegroundColor Cyan
|
Write-Host "Downloading program into local directory..." -ForegroundColor Cyan
|
||||||
Invoke-RestMethod "https://github.com/Baipyrus/ProxySwitcher/releases/latest/download/ProxySwitcher.zip" -OutFile $env:TMP
|
Invoke-RestMethod "https://github.com/Baipyrus/ProxySwitcher/releases/latest/download/ProxySwitcher.zip" -OutFile $tmpPRSWzip
|
||||||
|
|
||||||
# Expand Archive to program directory
|
# Expand Archive to program directory
|
||||||
Expand-Archive "$env:TMP\ProxySwitcher.zip" -DestinationPath $programPath
|
Expand-Archive $tmpPRSWzip -DestinationPath $programPath
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add program to PATH for cli application
|
# Add program to PATH for cli application
|
||||||
|
Loading…
Reference in New Issue
Block a user