File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -244,10 +244,21 @@ try {
244
244
[Net.ServicePointManager ]::SecurityProtocol = [Net.ServicePointManager ]::SecurityProtocol -bor [Net.SecurityProtocolType ]::Tls12
245
245
246
246
if ($Daily ) {
247
- $metadata = Invoke-RestMethod https:// pscoretestdata.blob.core.windows.net / buildinfo/ daily.json
247
+ $metadata = Invoke-RestMethod ' https://aka.ms/pwsh- buildinfo- daily'
248
248
$release = $metadata.ReleaseTag -replace ' ^v'
249
249
$blobName = $metadata.BlobName
250
250
251
+ # Get version from currently installed PowerShell Daily if available.
252
+ $pwshPath = Join-Path $Destination " pwsh"
253
+ $currentlyInstalledVersion = if (Test-Path $pwshPath ) {
254
+ ((& $pwshPath - version) -split " " )[1 ]
255
+ }
256
+
257
+ if ($currentlyInstalledVersion -eq $release ) {
258
+ Write-Verbose " Latest PowerShell Daily already installed." - Verbose
259
+ return
260
+ }
261
+
251
262
if ($IsWinEnv ) {
252
263
if ($UseMSI ) {
253
264
$packageName = " PowerShell-${release} -win-${architecture} .msi"
You can’t perform that action at this time.
0 commit comments