InstallerSwitches Hotfix (#11576)

Fixed InstallerSwitches getting commented out..
This commit is contained in:
Esco
2021-04-27 02:37:28 +02:00
committed by GitHub
parent b3cb423506
commit a03ca27cf5

View File

@@ -273,7 +273,7 @@ Function Read-WinGet-InstallerValues {
$Installer += " UpgradeBehavior: $UpgradeBehavior`n" $Installer += " UpgradeBehavior: $UpgradeBehavior`n"
$Installer.TrimEnd().Split("`n") | ForEach-Object { $Installer.TrimEnd().Split("`n") | ForEach-Object {
if ($_.Split(":").Trim()[1] -eq '') { if ($_.Split(":").Trim()[1] -eq '' -and $_ -notin @(" InstallerSwitches:")) {
$script:Installers += $_.Insert(0,"#") + "`n" $script:Installers += $_.Insert(0,"#") + "`n"
} else { } else {
$script:Installers += $_ + "`n" $script:Installers += $_ + "`n"
@@ -718,7 +718,7 @@ New-Item -ItemType "Directory" -Force -Path $AppFolder | Out-Null
$InstallerManifestPath = $AppFolder + "\$PackageIdentifier" + '.installer' + '.yaml' $InstallerManifestPath = $AppFolder + "\$PackageIdentifier" + '.installer' + '.yaml'
$InstallerManifest | ForEach-Object { $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,"#") $_.Insert(0,"#")
} else { } else {
$_ $_