Fix Test-Connection due to .NET 8 changes#20369
Fix Test-Connection due to .NET 8 changes#20369daxian-dbw merged 4 commits intoPowerShell:masterfrom
Test-Connection due to .NET 8 changes#20369Conversation
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
|
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
sudoon Linux.PR Context
Fix #17018
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.Test-Connectionrequiressudoon Linux for custom buffer size MicrosoftDocs/PowerShell-Docs#10458(which runs in a different PS Host).