Skip to content

Commit

Permalink
Merge pull request #538 from mjcheetham/github-tty
Browse files Browse the repository at this point in the history
Show GitHub terminal prompts when no GUI session
  • Loading branch information
mjcheetham authored Nov 18, 2021
2 parents 7c4381c + 55bd292 commit 898b6d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shared/GitHub/GitHubAuthentication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public async Task<AuthenticationPromptResult> GetAuthenticationAsync(Uri targetU
throw new ArgumentException(@$"Must specify at least one {nameof(AuthenticationModes)}", nameof(modes));
}

if (TryFindHelperExecutablePath(out string helperPath))
if (Context.SessionManager.IsDesktopSession && TryFindHelperExecutablePath(out string helperPath))
{
var promptArgs = new StringBuilder("prompt");
if (modes == AuthenticationModes.All)
Expand Down Expand Up @@ -207,7 +207,7 @@ public async Task<string> GetTwoFactorCodeAsync(Uri targetUri, bool isSms)
{
ThrowIfUserInteractionDisabled();

if (TryFindHelperExecutablePath(out string helperPath))
if (Context.SessionManager.IsDesktopSession && TryFindHelperExecutablePath(out string helperPath))
{
var args = new StringBuilder("2fa");
if (isSms) args.Append(" --sms");
Expand Down

0 comments on commit 898b6d1

Please sign in to comment.