Handle edge case for help usage

This commit is contained in:
Matt Nadareski
2020-09-30 10:01:04 -07:00
parent ae59978bee
commit 2099a82b2b

View File

@@ -178,6 +178,13 @@ namespace SabreTools.Library.Help
// Start building the output list // Start building the output list
List<string> output = new List<string>(); List<string> output = new List<string>();
// If the feature name is null, empty, or just consisting of `-` characters, just show everything
if (string.IsNullOrEmpty(featurename?.TrimStart('-')))
{
OutputGenericHelp();
return;
}
// Now try to find the feature that has the name included // Now try to find the feature that has the name included
string realname = null; string realname = null;
List<string> startsWith = new List<string>(); List<string> startsWith = new List<string>();