-
-
Notifications
You must be signed in to change notification settings - Fork 808
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
Set-DbaStartupParameter - getting 1.0 ready #5298
Conversation
Update Get-DbaAgentJobHistory.ps1
Ok, as long as test pass everything is good to go on this one... |
} catch { | ||
Stop-Function -Message "Unable to gather current startup parameters" -Target $SqlInstance -ErrorRecord $_ | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is particularly important to do anytime we are calling other public functions in our commands. Because this was not including EnableException
and wrapped in a try/catch it was falsely assuming SingleUser was true at current line 237 because the object didn't have any content to begin with.... so if (!($currentStartup.SingleUser))
will return true when that property is true AND when $currentStartup -eq $null
...so the object itself had no content.
Had to add few quick fixes for the copy startup proc command that I found missed. |
looks good, ty! |
* add additional exclusion tag excluding Solution Provided tag * fixes #5287 * Set-DbaStartupParameter - getting 1.0 ready (#5298) * Merge pull request #5157 from SQLGB/patch-1 Update Get-DbaAgentJobHistory.ps1 * format, add catch for call to get cmd * change parameter to singular * correct parameter names in test * updating parameter reference * adjust appveyor reference * quick fix for copy startup proc format and spelling * Update issue templates Updating template on bug reports * Update issue templates adding wrapper command to gather info and allow them to paste it * fixing owned job comparison (#5301) * 0.9.797
Type of Change
Purpose
Working through #5292 and overall getting ready for 1.0 (e.g. apply standard on formatting, try/catch around child calls to other dbatools commands, etc.)