diff --git a/assets/Product.wxs b/assets/Product.wxs index 873dd11dabd..0054862dcd5 100644 --- a/assets/Product.wxs +++ b/assets/Product.wxs @@ -165,7 +165,7 @@ - + diff --git a/tools/appveyor.psm1 b/tools/appveyor.psm1 index a0d0c144277..54b1c5fc569 100644 --- a/tools/appveyor.psm1 +++ b/tools/appveyor.psm1 @@ -486,6 +486,16 @@ function Invoke-AppveyorFinish $preReleaseVersion = "$previewPrefix-$previewLabel.$env:APPVEYOR_BUILD_NUMBER" } + # Save any PowerShell paths, so we can exclude them + # When we verify we updated the path + $beforePath = @(([System.Environment]::GetEnvironmentVariable('PATH','MACHINE')) -split ';' | + Where-Object {$_ -like '*files\powershell*'}) + + foreach($pathPart in $beforePath) + { + Write-Log "Found existing PowerShell path: $pathPart" + } + # Smoke Test MSI installer Write-Log "Smoke-Testing MSI installer" $msi = $artifacts | Where-Object { $_.EndsWith(".msi")} @@ -499,6 +509,15 @@ function Invoke-AppveyorFinish } Write-Log "MSI smoke test was successful" + # Verify path was updated by MSI + $psPath = ([System.Environment]::GetEnvironmentVariable('PATH','MACHINE')) -split ';' | + Where-Object {$_ -like '*files\powershell*' -and $_ -notin $beforePath} + + if(!$psPath) + { + throw "MSI did not add powershell to path" + } + # only publish assembly nuget packages if it is a daily build and tests passed if((Test-DailyBuild) -and $env:TestPassed -eq 'True') {