From e1bb97ab7a70f187d1ff54f7d7e1e57e7631092a Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Wed, 2 Jun 2021 14:08:57 +0100 Subject: [PATCH] github: fix bug in x-UI cmdline parsing The System.CommandLine command line binding requires the parameter names match the option names. During the rebasing of the x-platform UI work, the argument name for the `--oauth` option was left as `browser` which means the OAuth browser flow is never shown, even though the base GCM program is passing the right argument/options. --- src/shared/GitHub.UI/Commands/CredentialsCommand.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/GitHub.UI/Commands/CredentialsCommand.cs b/src/shared/GitHub.UI/Commands/CredentialsCommand.cs index 5942654b4..ec4b81e23 100644 --- a/src/shared/GitHub.UI/Commands/CredentialsCommand.cs +++ b/src/shared/GitHub.UI/Commands/CredentialsCommand.cs @@ -39,11 +39,11 @@ public CredentialsCommand(ICommandContext context) Handler = CommandHandler.Create(ExecuteAsync); } - private async Task ExecuteAsync(string enterpriseUrl, string userName, bool basic, bool browser, bool pat) + private async Task ExecuteAsync(string enterpriseUrl, string userName, bool basic, bool oauth, bool pat) { var viewModel = new CredentialsViewModel(Context.Environment) { - ShowBrowserLogin = browser, + ShowBrowserLogin = oauth, ShowTokenLogin = pat, ShowBasicLogin = basic, };