Skip to content

Add command builder with escaped user input - #5982

Merged
AmirMS (AmelBawa-msft) merged 9 commits into
microsoft:masterfrom
AmelBawa-msft:user/amelbawa/pwsh-fix
Jan 23, 2026
Merged

AmirMS (AmelBawa-msft) merged 9 commits into
microsoft:masterfrom
AmelBawa-msft:user/amelbawa/pwsh-fix

Conversation

@AmelBawa-msft

@AmelBawa-msft AmirMS (AmelBawa-msft) commented Jan 15, 2026 •

Copy link
Copy Markdown
Contributor

  • 🧱 Add a command builder with escaped user input
  • ⚠️ Unfortunately, using StartInfo.ArgumentList is not available in net48, hence manually implementing the escape method.
  • 🧪 Added unit tests
Microsoft Reviewers: Open in CodeFlow

@AmelBawa-msft
AmirMS (AmelBawa-msft) marked this pull request as ready for review January 21, 2026 23:51
@AmelBawa-msft
AmirMS (AmelBawa-msft) requested a review from a team as a code owner January 21, 2026 23:51
@github-actions

This comment has been minimized.

@JohnMcPMS JohnMcPMS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the tests to the pipeline as well so that we get coverage.

Comment thread src/PowerShell/Microsoft.WinGet.Client.Engine/Helpers/WinGetCLICommandBuilder.cs Outdated
Comment thread src/PowerShell/Microsoft.WinGet.Client.Engine/Helpers/WinGetCLICommandBuilder.cs Outdated
Comment thread src/PowerShell/Microsoft.WinGet.Client.Engine/Helpers/WinGetCLICommandBuilder.cs Outdated
JohnMcPMS
JohnMcPMS previously approved these changes Jan 23, 2026
@AmelBawa-msft
AmirMS (AmelBawa-msft) merged commit db48e47 into microsoft:master Jan 23, 2026
9 checks passed
@AmelBawa-msft
AmirMS (AmelBawa-msft) deleted the user/amelbawa/pwsh-fix branch January 23, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants