You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ""
The text was updated successfully, but these errors were encountered:
TriggerAu
added a commit
to TriggerAu/okta-powershell-cli
that referenced
this issue
Dec 19, 2024
…ta#70)
Uses PSBoundParameter.ContainsKey rather than the if of the variable as
if the passed in value is 0 or $false the set is not done
same issue as okta#56, but in a different template
Thanks for reporting this issue, @TriggerAu. We still have your Okta Retry PR pending review, so we'll include this issue when reviewing that one as they're both related. Thank you for your patience!
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
okta-powershell-cli/src/Okta.PowerShell/Client/OktaConfiguration.ps1
Line 130 in f78b2c6
okta-powershell-cli/src/Okta.PowerShell/Client/OktaConfiguration.ps1
Lines 198 to 200 in f78b2c6
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
^ 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 ""
The text was updated successfully, but these errors were encountered: