From 10a1a7016ad8525aa4f090e235741447de8866b8 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 12 Oct 2020 09:49:41 -0700 Subject: [PATCH] [flutter_tool] prepend module name on Windows pwr shell (#67801) In case different powershell module is installed over the default name. Fixes #22896 --- bin/internal/update_dart_sdk.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/internal/update_dart_sdk.ps1 b/bin/internal/update_dart_sdk.ps1 index fc6f4d7308..0166dc8e83 100644 --- a/bin/internal/update_dart_sdk.ps1 +++ b/bin/internal/update_dart_sdk.ps1 @@ -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