Commit f985c3f
authored
Fix Regression in RunCommandAsync (#310)
## Description
Fix regression in RunCommandAsync. Restore trimmed output for stdout.
Restore trimmed errors for non-CLIXML errors.
## Related Issue
<!-- Link to any related issues: Fixes #123, Closes #456, Related to
#789 -->
#308
## Type of Change
<!-- Keep the applicable line(s), delete the rest -->
- 🐛 Bug fix
## Checklist
<!-- Delete the ones that do not apply to your changes -->
- [x] New tests added for new functionality (if applicable)
- [x] Tested locally on Windows
## Screenshots / Demo
`npx winapp restore --verbose` now prints
```
...
SKIP|Microsoft.WindowsAppRuntime.1.8.msix|Already installed or newer version exists
INSTALL|Microsoft.WindowsAppRuntime.DDLM.1.8.msix|Will install
SKIP|Microsoft.WindowsAppRuntime.Main.1.8.msix|Already installed or newer version exists
SKIP|Microsoft.WindowsAppRuntime.Singleton.1.8.msix|Already installed or newer version exists
INSTALLING|1 packages will be installed
SUCCESS|Microsoft.WindowsAppRuntime.DDLM.1.8.msix|Installation successful
...
```
Output like this was missing before change.
## Additional Notes
<!-- Any additional information that reviewers should know -->
## AI Description
<!-- ai-description-start -->
This pull request fixes a regression in the `RunCommandAsync` method by
restoring the trimmed output for both standard output (stdout) and error
output (stderr) streams, improving the command result handling in the
CLI. This enhancement ensures that users receive the intended output
format when executing restore commands. After this change, the command:
```bash
npx winapp restore --verbose
```
will provide clearer output with appropriate success markers included.
<!-- ai-description-end -->1 parent 704c32d commit f985c3f
File tree
2 files changed
+60
-5
lines changed- src/winapp-CLI
- WinApp.Cli.Tests
- WinApp.Cli/Services
2 files changed
+60
-5
lines changedLines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
| 103 | + | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
132 | 138 | | |
133 | 139 | | |
134 | 140 | | |
135 | | - | |
| 141 | + | |
136 | 142 | | |
137 | 143 | | |
138 | 144 | | |
| |||
153 | 159 | | |
154 | 160 | | |
155 | 161 | | |
156 | | - | |
| 162 | + | |
| 163 | + | |
157 | 164 | | |
158 | 165 | | |
159 | 166 | | |
| |||
0 commit comments