Skip to content

Commit

Permalink
Use explicit help detection
Browse files Browse the repository at this point in the history
  • Loading branch information
calebkiage committed Nov 1, 2023
1 parent 687e975 commit 04fd9bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static async Task<int> Main(string[] args)
// Replace `me ...` with `users ... --user-id me`
if (args[0] == "me")
{
var hasHelp = args.Any(static x => x.Contains("-h") || x.Contains("/?"));
var hasHelp = args.Any(static x => x == "--help" || x == "-h" || x == "/?");
var newArgs = hasHelp ? args : new string[args.Length + 2];
newArgs[0] = "users";
for (var i = 1; i < args.Length; i++)
Expand Down

0 comments on commit 04fd9bb

Please sign in to comment.