Merged PR 9996: Fix ExperimentalFeature list generation

This commit is contained in:
Travis Plunk 2019-09-16 19:22:34 +00:00
parent 29f1c3132f
commit 06aedae91e

View file

@ -490,10 +490,19 @@ Fix steps:
}
# ARM is cross compiled, so we can't run pwsh to enumerate Experimental Features
if ((Test-IsPreview $psVersion) -and -not $Runtime.Contains("arm")) {
if ((Test-IsPreview $psVersion) -and -not $Runtime.Contains("arm") -and -not ($Runtime -like 'fxdependent*')) {
$json = & $publishPath\pwsh -noprofile -command {
$expFeatures = [System.Collections.Generic.List[string]]::new()
Get-ExperimentalFeature | ForEach-Object { $expFeatures.Add($_.Name) }
# Make sure ExperimentalFeatures from modules in PSHome are added
# https://github.com/PowerShell/PowerShell/issues/10550
@("PSDesiredStateConfiguration.InvokeDscResource") | ForEach-Object {
if (!$expFeatures.Contains($_)) {
$expFeatures.Add($_)
}
}
ConvertTo-Json $expFeatures.ToArray()
}