-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Fix Test-Connection
due to .NET 8 changes
#20369
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/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Show resolved
Hide resolved
If this cmdlet is running with elevated permissions on Linux, why not just check for those permissions for certain parameters and report an error if needed? (As far as I remember there is a way to set up ping for a regular user too. I don't think it's necessary to complicate our installer, but all this could be simply reflected in the documentation. Or we could create something like Enable-PSRemoting.) |
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
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.
LGTM
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
What pwsh version has this fix for Test-Connection ? I tried 7.4.0-preview.6 but still requires sudo on Linux |
PR Summary
.NET 8 made a change on how a custom buffer works on Linux, so we have to change the code to use a default empty buffer so that .NET uses its own default buffer. A custom buffer size requires
sudo
on Linux.PR Context
Fix #17018
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.Test-Connection
requiressudo
on Linux for custom buffer size MicrosoftDocs/PowerShell-Docs#10458(which runs in a different PS Host).