Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Teams check in Invoke-Maester #334

Merged
merged 1 commit into from
Jul 14, 2024
Merged

Conversation

fflaten
Copy link
Contributor

@fflaten fflaten commented Jul 13, 2024

Fixes small bug introduced in #308 that always required teams API permissions. $null default value for parameters results in empty string when cast to [string] which is never null.

PR reverts default values and checks that both parameters are not null or empty strings before requesting Teams-permissions.

/cc @Snozzberries

@fflaten fflaten requested a review from a team as a code owner July 13, 2024 12:15
@soulemike
Copy link
Contributor

I think this is a cleaner approach than the default value of $null to force the logic.

Quick cross-platform check:

Windows Core
image

Ubuntu PWSH
image

Windows PowerShell
image

@f-bader f-bader merged commit 085b426 into maester365:main Jul 14, 2024
4 checks passed
@fflaten fflaten deleted the fix-teamscheck branch July 14, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants