Skip to content

Remove unnecessary Trim() call of debug command line being invoked - #8594

Merged
Dongbo Wang (daxian-dbw) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:debug-trim
Jan 6, 2019
Merged

Remove unnecessary Trim() call of debug command line being invoked#8594
Dongbo Wang (daxian-dbw) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:debug-trim

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Jan 5, 2019

Copy link
Copy Markdown
Member

PR Summary

The previous code was trimming the command line before passing it to PowerShell to invoke. This is incorrect as it transforms what the user typed. Specifically this causes an issue with PSReadLine. Fix is to remove the Trim() call and pass the command line through as-is. Tested manually that the issue still repro'd and resolved with this change.

Fix #5374

PR Checklist

@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 21fcf07 into PowerShell:master Jan 6, 2019
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the debug-trim branch January 7, 2019 00:54
@iSazonov Ilya (iSazonov) added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Jan 17, 2019
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

While debugging, sometimes won't cancel, and "accepting"

4 participants