-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
portions of the codebase us statements like this to set values - I think its meant to be doing this based on if a parameter was passed
| function Set-OktaConfiguration { |
okta-powershell-cli/src/Okta.PowerShell/Client/OktaConfiguration.ps1
Lines 198 to 200 in f78b2c6
| If ($MaxRetries) { | |
| $Script:Configuration['MaxRetries'] = $MaxRetries | |
| } |
But the problem with this is that if the passed in value is 0 then the if is false and thus the values never set
eg this example shows the problem
$MaxRetries = 0
If ($MaxRetries) {
$Script:Configuration['MaxRetries'] = $MaxRetries
} else {
"No Value"
}
^ will output No-Value
The specific Set-OktaConfigurationMaxRetries works finem but these if statements in methods for checking parameters are problemmatic if the user is trying to set 0 or ""
Metadata
Metadata
Assignees
Labels
No labels