[flutter_tool] prepend module name on Windows pwr shell (#67801)

In case different powershell module is installed over the default name. Fixes #22896
This commit is contained in:
Jonah Williams
2020-10-12 09:49:41 -07:00
committed by GitHub
parent 0bc87a5816
commit 10a1a7016a

View File

@@ -76,9 +76,9 @@ If (Get-Command 7z -errorAction SilentlyContinue) {
} ElseIf (Get-Command 7za -errorAction SilentlyContinue) {
# Use 7-Zip's standalone version 7za.exe, if available.
& 7za x $dartSdkZip "-o$cachePath" -bd | Out-Null
} ElseIf (Get-Command Expand-Archive -errorAction SilentlyContinue) {
} ElseIf (Get-Command Microsoft.PowerShell.Archive\Expand-Archive -errorAction SilentlyContinue) {
# Use PowerShell's built-in unzipper, if available (requires PowerShell 5+).
Expand-Archive $dartSdkZip -DestinationPath $cachePath
Microsoft.PowerShell.Archive\Expand-Archive $dartSdkZip -DestinationPath $cachePath
} Else {
# As last resort: fall back to the Windows GUI.
$shell = New-Object -com shell.application