Commit 9e1ec23
Keep msstore package stdout clean, and print an absolute path
Follow-up from self-review of the previous commit.
Making `package` treat stdout as its machine-readable result exposed two
other writers on that same path that still went through the static
Spectre console (which targets stdout):
- `WinUIProjectConfigurator` hosted its "Building MSIX..." status on the
static `AnsiConsole` — the only configurator that did; every sibling
uses the injected stderr console, and the block already reported
success via `ctx.SuccessStatus(ErrorAnsiConsole, ...)`. When stdout is
redirected Spectre falls back to `FallbackStatusRenderer`, which writes
the description permanently rather than clearing it, so the status text
landed in the piped output ahead of the path.
- `ValidateImagesAsync` takes an `IAnsiConsole` and forwards it to
`ProjectImagesHelper`, but used the static console for its own two
warning lines, so the default-images warning went to stdout.
Both now use the console they already had in hand.
Also print `outputDirectory.FullName` rather than `ToString()`.
`DirectoryInfo.ToString()` returns the original, unnormalised path, and
`PWAProjectConfigurator.PackageAsync` returns `new DirectoryInfo(pathOrUrl)`
built straight from the command argument — so `msstore package .` emitted
a bare `.`, which is useless to a caller consuming stdout. The other five
packagers derive their result from `FileInfo(...).Directory`, whose path
is already absolute, so this is a no-op for them.
Tests now assert that `package` writes exactly one line to stdout, which
is what pins the behaviour these fixes restore.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: af8e5c71-6935-4efa-b777-64b180bb20c71 parent 92c76b2 commit 9e1ec23
4 files changed
Lines changed: 12 additions & 12 deletions
File tree
- MSStore.CLI.UnitTests
- MSStore.CLI
- Commands
- Helpers
- ProjectConfigurators
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
| 378 | + | |
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
429 | | - | |
| 429 | + | |
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
| 481 | + | |
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
| 517 | + | |
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | | - | |
| 569 | + | |
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
0 commit comments