Skip to content

Commit 6c69322

Browse files
🩹 [Patch]: Cleanup of some minor stuff (#95)
## Description - Cleanup of some minor stuff ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent b098176 commit 6c69322

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GitHub/public/Auth/Connect-GitHubAccount.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
'DeviceFlow' {
112112
Write-Verbose 'Logging in using device flow...'
113113
$clientID = $script:Auth.$Mode.ClientID
114-
if ($Mode -ne (Get-GitHubConfig -Name DeviceFlowType -ErrorAction SilentlyContinue)) {
114+
if ($Mode -ne (Get-GitHubConfig -Name 'DeviceFlowType' -ErrorAction SilentlyContinue)) {
115115
Write-Verbose "Using $Mode authentication..."
116116
$tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $clientID -Scope $Scope
117117
} else {
@@ -133,7 +133,7 @@
133133
Write-Host '' -ForegroundColor Yellow -NoNewline
134134
Write-Host "Access token remaining validity $accessTokenValidityText. Refreshing access token..."
135135
}
136-
$tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $clientID -RefreshToken (Get-GitHubConfig -Name RefreshToken)
136+
$tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $clientID -RefreshToken (Get-GitHubConfig -Name 'RefreshToken')
137137
}
138138
} else {
139139
$refreshTokenValidity = [datetime](Get-GitHubConfig -Name 'RefreshTokenExpirationDate') - (Get-Date)
@@ -143,7 +143,7 @@
143143
Write-Host '' -ForegroundColor Yellow -NoNewline
144144
Write-Host 'Access token expired. Refreshing access token...'
145145
}
146-
$tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $clientID -RefreshToken (Get-GitHubConfig -Name RefreshToken)
146+
$tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $clientID -RefreshToken (Get-GitHubConfig -Name 'RefreshToken')
147147
} else {
148148
Write-Verbose "Using $Mode authentication..."
149149
$tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $clientID -Scope $Scope

0 commit comments

Comments
 (0)