1
1
<# PSScriptInfo
2
2
3
- .VERSION 1.4.0
3
+ .VERSION 1.4.1
4
4
5
5
.GUID 539e5585-7a02-4dd6-b9a6-5dd288d0a5d0
6
6
130
130
[CmdletBinding (SupportsShouldProcess = $true )]
131
131
param (
132
132
[parameter ()]
133
- [ValidateSet (, " 64-bit" , " 32-bit" )]
134
- [string ]$Architecture = " 64-bit" ,
133
+ [ValidateSet (' 64-bit' , ' 32-bit' )]
134
+ [string ]$Architecture = ' 64-bit' ,
135
135
136
136
[parameter ()]
137
- [ValidateSet (" Stable-System" , " Stable-User" , " Insider-System" , " Insider-User" )]
137
+ [ValidateSet (' Stable-System' , ' Stable-User' , ' Insider-System' , ' Insider-User' )]
138
138
[string ]$BuildEdition = " Stable-System" ,
139
139
140
140
[Parameter ()]
@@ -168,7 +168,7 @@ gpgkey=https://packages.microsoft.com/keys/microsoft.asc
168
168
169
169
function Test-IsOsArchX64 {
170
170
if ($PSVersionTable.PSVersion.Major -lt 6 ) {
171
- return (Get-CimInstance - ClassName Win32_OperatingSystem).OSArchitecture -eq " 64-bit"
171
+ return (Get-CimInstance - ClassName Win32_OperatingSystem).OSArchitecture -eq ' 64-bit'
172
172
}
173
173
174
174
return [System.Runtime.InteropServices.RuntimeInformation ]::OSArchitecture -eq [System.Runtime.InteropServices.Architecture ]::X64
@@ -404,19 +404,19 @@ function Save-WithBitsTransfer {
404
404
405
405
$bitsDl = Start-BitsTransfer $FileUri - Destination $Destination - Asynchronous
406
406
407
- while (($bitsDL.JobState -eq " Transferring" ) -or ($bitsDL.JobState -eq " Connecting" )) {
407
+ while (($bitsDL.JobState -eq ' Transferring' ) -or ($bitsDL.JobState -eq ' Connecting' )) {
408
408
Write-Progress - Activity " Downloading: $AppName " - Status " $ ( [math ]::round($bitsDl.BytesTransferred / 1 mb )) mb / $ ( [math ]::round($bitsDl.BytesTotal / 1 mb )) mb" - PercentComplete ($ ($bitsDl.BytesTransferred ) / $ ($bitsDl.BytesTotal ) * 100 )
409
409
}
410
410
411
411
switch ($bitsDl.JobState ) {
412
412
413
- " Transferred" {
413
+ ' Transferred' {
414
414
Complete-BitsTransfer - BitsJob $bitsDl
415
415
break
416
416
}
417
417
418
- " Error" {
419
- throw " Error downloading installation media."
418
+ ' Error' {
419
+ throw ' Error downloading installation media.'
420
420
}
421
421
}
422
422
}
@@ -433,7 +433,7 @@ function Install-VSCodeFromTar {
433
433
)
434
434
435
435
$tarDir = Join-Path ([System.IO.Path ]::GetTempPath()) ' VSCodeTar'
436
- $destDir = " /opt/VSCode-linux-x64"
436
+ $destDir = ' /opt/VSCode-linux-x64'
437
437
438
438
New-Item - ItemType Directory - Force - Path $tarDir
439
439
try {
0 commit comments