mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-06-03 16:00:49 +00:00
Fully qualify Expand-Archive (#2066)
If a user has the Powershell Community Extensions installed, it comes with another command Expand-Archive that doesn't have a DestinationPath argument, causing an error.
This commit is contained in:
parent
43d1c4c4b5
commit
06d63a862e
|
@ -57,7 +57,7 @@ function download {
|
||||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||||
(New-Object Net.WebClient).DownloadFile($url, $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath("$temp"))
|
(New-Object Net.WebClient).DownloadFile($url, $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath("$temp"))
|
||||||
if ($?) {
|
if ($?) {
|
||||||
(Expand-Archive -Path $temp -DestinationPath .); (Remove-Item $temp)
|
(Microsoft.PowerShell.Archive\Expand-Archive -Path $temp -DestinationPath .); (Remove-Item $temp)
|
||||||
} else {
|
} else {
|
||||||
$binary_error="Failed to download with powershell"
|
$binary_error="Failed to download with powershell"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user