From f418d5fdea1304c69d52b1a6afbe2d709f3eb1e6 Mon Sep 17 00:00:00 2001 From: Ethan Moffat Date: Sun, 6 Feb 2022 19:36:49 -0800 Subject: [PATCH] Fix extended help case if user-defined args contains "help" --- EOBot/ArgumentsParser.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EOBot/ArgumentsParser.cs b/EOBot/ArgumentsParser.cs index 2de648d01..62b50a831 100644 --- a/EOBot/ArgumentsParser.cs +++ b/EOBot/ArgumentsParser.cs @@ -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; }