File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/WingetCreateCLI/Commands Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,10 @@ public override async Task<bool> Execute()
195195 try
196196 {
197197 PackageParser . ParsePackages ( installerUpdateList , manifests ) ;
198+
199+ // The CLI parses ARP entries uses them in update flow to update existing AppsAndFeaturesEntries in the manifest.
200+ // AppsAndFeaturesEntries should not be set for a new package as they may cause more harm than good.
201+ RemoveARPEntries ( manifests . InstallerManifest ) ;
198202 DisplayArchitectureWarnings ( installerUpdateList ) ;
199203 }
200204 catch ( IOException iOException ) when ( iOException . HResult == - 2147024671 )
@@ -508,6 +512,15 @@ private static void MergeNestedInstallerFilesIfApplicable(InstallerManifest inst
508512 }
509513 }
510514
515+ private static void RemoveARPEntries ( InstallerManifest installerManifest )
516+ {
517+ installerManifest . AppsAndFeaturesEntries = null ;
518+ foreach ( var installer in installerManifest . Installers )
519+ {
520+ installer . AppsAndFeaturesEntries = null ;
521+ }
522+ }
523+
511524 /// <summary>
512525 /// Prompts for the package identifier and applies the value to all manifests.
513526 /// </summary>
You can’t perform that action at this time.
0 commit comments