Skip to content

Commit

Permalink
Fix regex switch statement to correctly evaluate authentication type …
Browse files Browse the repository at this point in the history
…in Set-GitHubContext function
  • Loading branch information
MariusStorhaug committed Dec 14, 2024
1 parent e780683 commit 7b4aec1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functions/public/Auth/Context/Set-GitHubContext.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function Set-GitHubContext {
# Run functions to get info on the temporary context.
try {
Write-Verbose "Getting info on the context [$($contextObj['AuthType'])]."
switch -Regex ($contextObj['AuthType']) {
switch -Regex ($($contextObj['AuthType'])) {
'PAT|UAT|IAT' {
$viewer = Get-GitHubViewer -Context $contextObj
$viewer | Out-String -Stream | ForEach-Object { Write-Verbose $_ }
Expand Down

0 comments on commit 7b4aec1

Please sign in to comment.