From a03ca27cf557ac7be099e77267026dcc1c78cadb Mon Sep 17 00:00:00 2001 From: Esco Date: Tue, 27 Apr 2021 02:37:28 +0200 Subject: [PATCH] InstallerSwitches Hotfix (#11576) Fixed InstallerSwitches getting commented out.. --- Tools/YamlCreate.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/YamlCreate.ps1 b/Tools/YamlCreate.ps1 index 2df2bafea..847d3f03d 100644 --- a/Tools/YamlCreate.ps1 +++ b/Tools/YamlCreate.ps1 @@ -273,7 +273,7 @@ Function Read-WinGet-InstallerValues { $Installer += " UpgradeBehavior: $UpgradeBehavior`n" $Installer.TrimEnd().Split("`n") | ForEach-Object { - if ($_.Split(":").Trim()[1] -eq '') { + if ($_.Split(":").Trim()[1] -eq '' -and $_ -notin @(" InstallerSwitches:")) { $script:Installers += $_.Insert(0,"#") + "`n" } else { $script:Installers += $_ + "`n" @@ -718,7 +718,7 @@ New-Item -ItemType "Directory" -Force -Path $AppFolder | Out-Null $InstallerManifestPath = $AppFolder + "\$PackageIdentifier" + '.installer' + '.yaml' $InstallerManifest | ForEach-Object { - if ($_.Split(":").Trim()[1] -eq '' -and $_ -notin @("FileExtensions:","Protocols:","Commands:","InstallerSuccessCodes:","InstallModes:","Installers:"," - Architecture"," InstallerSwitches:")) { + if ($_.Split(":").Trim()[1] -eq '' -and $_ -notin @("FileExtensions:","Protocols:","Commands:","InstallerSuccessCodes:","InstallModes:","Installers:"," InstallerSwitches:")) { $_.Insert(0,"#") } else { $_