-
-
Notifications
You must be signed in to change notification settings - Fork 810
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
New-DbaDbUser: Refactoring and bugfixing #9386
Conversation
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.
Had time just to do a first round as an "editor", other things may pop up
Thanks @niphlod for the feedback, just fixed some typos. One additional point: Pipeline Input. A lot of commands accept pipeline input, most other ...-DbaDb... commands accept database SMOs to be piped in. That would also be my recommendation. But I wanted to get feedback before changing the code. |
on "the pipeline" ... I guess it has not been "declared" a sound/strict rationale behind it. |
will merge once approved 👍🏼 |
Hell yeah, love that approval. Thank you both so much 🙇🏼 |
Type of Change
New-DbaDbUser
- Multiple-SqlInstance
Without-Database
Doesn't Add User To All Dbs #9340 ).\tests\manual.pester.ps1
)As I have to (re-)refactor this command a second time after the first refactoring in 2022, I want to do something new: Have a command with a lot of comments to tell other contributors how and why we do things.
I changed Stop-Function to support -WhatIf. Without that change, the variable is not set and Test-FunctionInterrupt does not work. Then, if the command fails in the begin block, the process block is still executed.
As I'm not a native english speaker, please correct all my mistakes in the new comments.
And there are some "Discussion" comments - which I would like to discuss.