chocolatey/choco · error · NotImplementedException
Alternative sources do not allow the use of the 'all' packag
Error message
Alternative sources do not allow the use of the 'all' package name/keyword.
What it means
Thrown as a NotImplementedException in CygwinService.Install when config.PackageNames equals ApplicationParameters.AllPackages (the 'all' keyword). Alternative source types like Cygwin do not support the 'all' keyword because their install mechanisms process packages one at a time through external tooling (Cygwin setup.exe) that does not have a reliable 'install everything' equivalent.
Source
Thrown at src/chocolatey/infrastructure.app/services/CygwinService.cs:224
return args;
}
public void InstallDryRun(ChocolateyConfiguration config, Action<PackageResult, ChocolateyConfiguration> continueAction)
{
var args = BuildArgs(config, _installArguments);
this.Log().Info("Would have run '{0} {1}'".FormatWith(GetCygwinPath(RootDirectory).EscapeCurlyBraces(), args.EscapeCurlyBraces()));
}
public ConcurrentDictionary<string, PackageResult> Install(ChocolateyConfiguration config, Action<PackageResult, ChocolateyConfiguration> continueAction)
{
return Install(config, continueAction, beforeModifyAction: null);
}
public ConcurrentDictionary<string, PackageResult> Install(ChocolateyConfiguration config, Action<PackageResult, ChocolateyConfiguration> continueAction, Action<PackageResult, ChocolateyConfiguration> beforeModifyAction)
{
if (config.PackageNames.IsEqualTo(ApplicationParameters.AllPackages))
{
throw new NotImplementedException("Alternative sources do not allow the use of the 'all' package name/keyword.");
}
var args = BuildArgs(config, _installArguments);
var packageResults = new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);
foreach (var packageToInstall in config.PackageNames.Split(new[] { ApplicationParameters.PackageNamesSeparator }, StringSplitOptions.RemoveEmptyEntries))
{
var argsForPackage = args.Replace(PackageNameToken, packageToInstall);
var exitCode = _commandExecutor.Execute(
GetCygwinPath(RootDirectory),
argsForPackage,
config.CommandExecutionTimeoutSeconds,
_fileSystem.GetCurrentDirectory(),
(s, e) =>
{
var logMessage = e.Data;
if (string.IsNullOrWhiteSpace(logMessage))
View on GitHub (pinned to 0d5abdd10c)
Solutions
- List individual Cygwin package names explicitly: 'choco install bash wget curl --source-type=cygwin'.
- Do not use the 'all' keyword with alternative source types — it is only supported for normal sources.
- If you need multiple Cygwin packages, enumerate them or use a packages.config file with the normal install command.
Example fix
// before: using 'all' keyword with Cygwin source choco install all --source-type=cygwin // after: specify individual package names choco install bash wget curl --source-type=cygwin
Defensive patterns
Strategy: validation
Validate before calling
// Before calling Install on an alternative source, reject the 'all' keyword
if (!config.SourceType.IsEqualTo(SourceTypes.Normal) &&
config.PackageNames.IsEqualTo(ApplicationParameters.AllPackages))
{
throw new InvalidOperationException(
"The 'all' keyword is not supported by alternative source types. List individual package names.");
} Type guard
public static bool IsValidPackageNamesForAlternativeSource(string packageNames, string sourceType)
{
if (sourceType.IsEqualTo(SourceTypes.Normal)) return true;
return !packageNames.IsEqualTo(ApplicationParameters.AllPackages);
} Try / catch
try
{
_cygwinService.Install(config, action);
}
catch (NotImplementedException ex) when (ex.Message.Contains("'all' package name"))
{
logger.Error("Cannot use 'all' with Cygwin source. Specify individual Cygwin package names.");
} Prevention
- Never use the 'all' keyword with alternative source types (cygwin, python, ruby, windowsfeatures).
- Enumerate specific package names for alternative source installs.
- Validate package names before calling alternative source APIs.
When it happens
Trigger: Calling CygwinService.Install (via 'choco install all --source-type=cygwin') where config.PackageNames is exactly equal to ApplicationParameters.AllPackages. The equality check uses IsEqualTo (case-insensitive) before any package processing begins.
Common situations: A user or script runs 'choco install all --source-type=cygwin' expecting to install all available Cygwin packages. This is explicitly blocked for alternative sources. The 'all' keyword is only valid for normal Chocolatey/NuGet sources.
Related errors
- The '{0}' source does not support installing packages
- Package name is required. Please pass at least one package n
- Force dependencies can only be used with force also turned o
- When specifying the subcommand '{0}', you must also specify
- No rule with the name {0} could be found.
AI-assisted analysis of chocolatey/choco@0d5abdd10c (2026-08-13).
Data as JSON: /api/errors/32f2fb74aeda27bd.
Report an issue: GitHub.