diff --git a/DevProxy/Commands/DevProxyCommand.cs b/DevProxy/Commands/DevProxyCommand.cs index 2ff5502b..4308bc65 100644 --- a/DevProxy/Commands/DevProxyCommand.cs +++ b/DevProxy/Commands/DevProxyCommand.cs @@ -606,7 +606,18 @@ private void ConfigureCommand() ActivatorUtilities.CreateInstance(_serviceProvider), ActivatorUtilities.CreateInstance(_serviceProvider) }; - commands.AddRange(_plugins.SelectMany(p => p.GetCommands())); + var pluginCommands = _plugins.SelectMany(p => p.GetCommands()); + foreach (var group in pluginCommands.GroupBy(c => c.Name)) + { + var command = group.First(); + commands.Add(command); + if (group.Count() > 1) + { + _logger.LogWarning( + "Multiple plugins register the '{CommandName}' command. Only the first registration will be used", + command.Name); + } + } this.AddCommands(commands.OrderByName()); HelpExamples.Add(this, [