Skip to content

Commit

Permalink
Fix extended help case if user-defined args contains "help"
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed Feb 7, 2022
1 parent 940e3cc commit f418d5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion EOBot/ArgumentsParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public ArgumentsParser(string[] args)

Error = ArgsError.NoError;

if (args.Select(x => x.ToLower()).Any(x => x == "help"))
if ((!args.Contains("--") && args.Select(x => x.ToLower()).Contains("help")) ||
(args.Contains("--") && args.TakeWhile(x => x != "--").Select(x => x.ToLower()).Contains("help")))
{
ExtendedHelp = true;
}
Expand Down

0 comments on commit f418d5f

Please sign in to comment.