Commit efdb418
committed
Fix extra_capabilities not being split and trim comma-separated lists
extra_capabilities was passed to Add-CapabilitiesToImage as a single raw
string instead of an array, so DISM received one bogus
/CapabilityName:"A,B" argument and failed (e.g. OpenSSH.Server,OpenSSH.Client
on Windows Server 2025).
Add a ConvertFrom-CommaSeparatedString helper that splits on commas, trims
whitespace around each entry and drops empty entries, and use it for
extra_features, extra_packages and extra_capabilities. This also fixes
whitespace-padded values (e.g. "A, B") that previously broke DISM, and
tolerates trailing commas.
Add unit tests for the new helper.
Closes: #4221 parent 342c678 commit efdb418
2 files changed
Lines changed: 46 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
671 | 684 | | |
672 | 685 | | |
673 | 686 | | |
| |||
1737 | 1750 | | |
1738 | 1751 | | |
1739 | 1752 | | |
1740 | | - | |
| 1753 | + | |
1741 | 1754 | | |
1742 | 1755 | | |
1743 | | - | |
| 1756 | + | |
1744 | 1757 | | |
1745 | 1758 | | |
1746 | 1759 | | |
1747 | 1760 | | |
1748 | | - | |
| 1761 | + | |
1749 | 1762 | | |
1750 | 1763 | | |
1751 | 1764 | | |
| |||
0 commit comments