Add an implementation of Stop-Computer for Linux and macOS#11151
Add an implementation of Stop-Computer for Linux and macOS#11151TravisEz13 merged 1 commit intoPowerShell:masterfrom
Stop-Computer for Linux and macOS#11151Conversation
55c7dbb to
db7bb30
Compare
|
I'm pretty sure the Windows CI run is a flake. |
There was a problem hiding this comment.
Please don't prevent cross compilation. Pass in the property from the build.psm1. You can then default the property if it is not set from the commandline.
There was a problem hiding this comment.
There was a problem hiding this comment.
Fixed to be a runtime thing.
There was a problem hiding this comment.
Is there a reason start-process won't work?
There was a problem hiding this comment.
I think you mean the C# Process class
There was a problem hiding this comment.
Yes, here is an example:
There was a problem hiding this comment.
-P is not an option on the macOS shutdown
There was a problem hiding this comment.
How do we handle it when the user doesn't have permissions to shutdown?
There was a problem hiding this comment.
The command will error out and we (now) write the error code to the stream.
src/Microsoft.PowerShell.Commands.Management/commands/management/ComputerUnix.cs
Outdated
Show resolved
Hide resolved
|
@brendandburns I had the CI system rerun the flaky tests and filed: #11168 |
PaulHigin
left a comment
There was a problem hiding this comment.
Overall looks good. I would like to see Restart-Computer also be enabled for non-Windows platforms.
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
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
8afdfc1 to
1be3fb8
Compare
|
Comments addressed, please re-check. |
90c6695 to
919fc84
Compare
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
|
comments addressed, please take another look. |
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
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 comments addressed, please take another look. Thanks! |
|
@TravisEz13 any chance you can take another look here, I'd love to see this merged since I have a follow up PR to share once it is merged. |
|
@brendandburns Sorry, I've been out of the office. |
Stop-Computer for Linux and macOS
|
🎉 Handy links: |
PR Summary
Adds an implementation of the Stop-Computer cmdlet for Linux and OS X
PR Context
Closes #5448
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.