Stop PowerShell from truncating Scoop listing output - #5434
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Bucket paths containing spaces can be dropped, and the regex is not NativeAOT-safe.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Improves Scoop output parsing by preventing PowerShell truncation and handling long or non-outdated package entries.
Changes:
- Adds wide PowerShell table formatting.
- Dynamically parses columns and strips ANSI sequences.
- Adds regression tests and fixtures for edge cases.
| File | Review |
|---|---|
src/UniGetUI.PackageEngine.Tests/ScoopManagerTests.cs |
Adds parsing regression tests and helpers. |
src/UniGetUI.PackageEngine.Tests/Fixtures/Scoop/status-output-not-outdated.txt |
Adds mixed update-status fixture. |
src/UniGetUI.PackageEngine.Tests/Fixtures/Scoop/list-output-not-outdated.txt |
Adds installed-package fixture. |
src/UniGetUI.PackageEngine.Managers.Scoop/Scoop.cs |
Improves update parsing; the compiled regex should be made NativeAOT-safe. |
src/UniGetUI.PackageEngine.Managers.Scoop/Helpers/ScoopSourceHelper.cs |
Adds wide bucket output, but whitespace tokenization breaks local paths containing spaces. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The unresolved critical path-handling defect and moderate NativeAOT regex issue must be addressed.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (2)
Resolved since last review (1)
There was a problem hiding this comment.
🤖 Pull request was approved automatically: the AI review is complete and all its review threads are resolved. 🎉
Integration Details
{
"deliveryId": "c4968f50-b6c5-11f1-87f3-b0ad5919b481",
"headSha": "00c04164242f82239975b5685fcbcba14531a5bb",
"reviewer": "copilot-pull-request-reviewer[bot]"
}

This pull request improves the reliability and accuracy of parsing tabular output from the Scoop package manager, especially when dealing with long package names or versions that can cause table columns to overflow the default console width. The changes ensure that all relevant packages are correctly identified and parsed, even in edge cases, and enhance test coverage for these scenarios.
Parsing improvements and robustness:
UntruncatedTableOutput) to force table output to use a wide width, preventing column truncation and overflow issues in commands that list buckets, installed packages, and available updates (ScoopSourceHelper.cs,Scoop.cs). [1] [2] [3] [4]Scoop.cs). [1] [2]Testing enhancements:
list-output-not-outdated.txt,status-output-not-outdated.txt). [1] [2]ScoopManagerTests.cs). [1] [2]Test infrastructure updates:
ScoopManagerTests.cs). [1] [2]