-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Refactor and implement Restart-Computer for Un*x and macOS
#11319
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
Conversation
src/Microsoft.PowerShell.Commands.Management/commands/management/ComputerUnix.cs
Outdated
Show resolved
Hide resolved
8de5006 to
b0fb0f3
Compare
|
@brendandburns Please don't rebase until maintainers ask you. Rebasing complicates reviewing. |
src/Microsoft.PowerShell.Commands.Management/commands/management/ComputerUnix.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/ComputerUnix.cs
Outdated
Show resolved
Hide resolved
SteveL-MSFT
left a comment
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.
The Windows Computer cmdlets already use a test hook for testing, should use the same thing here. See https://github.com/PowerShell/PowerShell/blob/master/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs#L2130
|
We merged #11151 without new tests. |
|
I will address comments and add tests for both commands. Thanks |
|
@iSazonov is there a preferred style of addressing comments for the PowerShell repo? Should I just add additional commits instead of squashing commits? (I'm new here :) Thanks |
Yes, please add new commits. Some commits or one for all comments. |
|
@brendandburns unless there is a need to preserve history, we always squash on merge. For the sake of the reviewers, it's always been easier to add new commits so we can see what exactly changed. |
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.
Please remove the commented code.
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.
Done.
324fa80 to
65d114c
Compare
|
Sorry it took so long for me to get back to this. I've added tests for both Please take another look. Thanks! |
src/Microsoft.PowerShell.Commands.Management/commands/management/ComputerUnix.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/ComputerUnix.cs
Outdated
Show resolved
Hide resolved
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.
Please use It "Should support -computer parameter" -Skip:(!$IsWindows) {
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.
done for all.
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.
The same. Below too.
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.
done for all.
|
@iSazonov comments addressed, please re-check. Thanks! |
|
@brendandburns Did you address all @SteveL-MSFT 's comments? |
|
yes, I verified in the code that I had addressed both of the comments from @SteveL-MSFT Thanks |
|
@SteveL-MSFT Please update your review. |
1 similar comment
|
@SteveL-MSFT Please update your review. |
|
@SteveL-MSFT Please update your review |
|
The merge is bad. I'll fix it. |
…nt/ComputerUnix.cs Co-Authored-By: Ilya <darpa@yandex.ru>
…nt/ComputerUnix.cs Co-Authored-By: Ilya <darpa@yandex.ru>
|
Rebased to resolve conflicts and changed |
|
@PoshChan Please remind me in 1 hour |
|
@TravisEz13, this is the reminder you requested 1 hour ago |
Restart-Computer for Un*x and macOS
|
@brendandburns Thanks for your contribution! |
|
🎉 Handy links: |
PR Summary
Implement the
Restart-Computercommand for Un*x and MacOSPR Context
Compliment to the recent implementation of
Stop-Computer(#11151)PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.