Skip to content

Commit

Permalink
github: fix bug in x-UI cmdline parsing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mjcheetham committed Jun 2, 2021
1 parent ff43eeb commit e1bb97a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shared/GitHub.UI/Commands/CredentialsCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ public CredentialsCommand(ICommandContext context)
Handler = CommandHandler.Create<string, string, bool, bool, bool>(ExecuteAsync);
}

private async Task<int> ExecuteAsync(string enterpriseUrl, string userName, bool basic, bool browser, bool pat)
private async Task<int> 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,
};
Expand Down

0 comments on commit e1bb97a

Please sign in to comment.