From 582df7b6435b8bfca8ab74e7aa422b29d0878041 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 7 Mar 2017 11:14:59 -0800 Subject: [PATCH] Minor fixes to SDK update PowerShell Script (#8617) * for Win 7, we need to import BitsTransfer before using it * switch to PowerShell's build-in archive expander (instead of relying on .NET) --- 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 300aac4d6d..8a8cd8cef0 100644 --- a/bin/internal/update_dart_sdk.ps1 +++ b/bin/internal/update_dart_sdk.ps1 @@ -41,9 +41,9 @@ if (Test-Path $dartSdkPath) { New-Item $dartSdkPath -force -type directory | Out-Null $dartSdkZip = "$cachePath\dart-sdk.zip" +Import-Module BitsTransfer Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip -Add-Type -assembly "system.io.compression.filesystem" -[io.compression.zipfile]::ExtractToDirectory($dartSdkZip, $cachePath) +Expand-Archive $dartSdkZip -DestinationPath $cachePath Remove-Item $dartSdkZip $dartSdkVersion | Out-File $dartSdkStampPath -Encoding ASCII