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
Fix Switch-Process error to include the command that is not found
#18443
Conversation
|
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? |
|
/backport to release/v7.3.1 |
|
@daxian-dbw backporting to release/v7.3.1 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix `Switch-Process` error to include the command that is not found
Using index info to reconstruct a base tree...
M src/System.Management.Automation/engine/Modules/SwitchProcessCommand.cs
M test/powershell/Modules/Microsoft.PowerShell.Core/Exec.Tests.ps1
Falling back to patching base and 3-way merge...
Auto-merging test/powershell/Modules/Microsoft.PowerShell.Core/Exec.Tests.ps1
CONFLICT (content): Merge conflict in test/powershell/Modules/Microsoft.PowerShell.Core/Exec.Tests.ps1
Auto-merging src/System.Management.Automation/engine/Modules/SwitchProcessCommand.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix `Switch-Process` error to include the command that is not found
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
PR Summary
The formatting of the error was incorrectly using the wrong variable which would be null. Fix is to use the first item in the input which is the command name.
Had to increase timeout in a test that kept failing with multiple reruns.
PR Context
Fix #18436
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.(which runs in a different PS Host).