[Bug] ChocolateyFactory skips the last or only package in output and crashes on duplicate keys

Author: SecretLULCreated Aug 24, 2026Updated Sep 7, 2026

Description

  1. In \ChocolateyFactory.GetUninstallerEntries(), the regex match loop only processed blocks between matches (\match = match.NextMatch(); if (!match.Success) break;). Consequently, the last package in any multi-package output, or the single package if only 1 package is installed, is completely skipped and never added to the detected application list.
  2. In \ExtractPackageInformation(), calling \kvps.Add(key, val)\ throws \ArgumentException\ whenever a chocolatey package description or field contains duplicate keys or multi-line key prefixes.

Expected Behavior

  • All installed Chocolatey packages should be detected and parsed.
  • Duplicate package metadata keys should not crash the uninstaller factory.

Source: BCUninstaller/Bulk-Crap-Uninstaller