1
0
mirror of https://github.com/desktop/desktop synced 2024-06-30 22:54:41 +00:00

Merge pull request #18822 from desktop/fix-auth-error-dialog

Show auth failure even if not using external credential helper
This commit is contained in:
Markus Olsson 2024-06-12 11:33:05 +02:00 committed by GitHub
commit 8fa936e02c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,7 +12,6 @@ import { enableCredentialHelperTrampoline } from '../feature-flag'
import { GitError, getDescriptionForError } from '../git/core'
import { deleteGenericCredential } from '../generic-git-auth'
import { getDesktopAskpassTrampolineFilename } from 'desktop-trampoline'
import { useExternalCredentialHelper } from './use-external-credential-helper'
const mostRecentGenericGitCredential = new Map<
string,
@ -186,7 +185,7 @@ export async function withTrampolineEnv<T>(
// We catch that specific error here and throw the user-friendly
// authentication failed error that we've always done in the past.
if (
useExternalCredentialHelper() &&
enableCredentialHelperTrampoline() &&
hasRejectedCredentialsForEndpoint.has(token) &&
e instanceof GitError &&
fatalPromptsDisabledRe.test(e.message)