Skip to content

Fix extra_capabilities not being split and trim comma-separated lists#424

Open
kallioli wants to merge 1 commit into
cloudbase:masterfrom
kallioli:fix/extra-features-capabilities-split
Open

Fix extra_capabilities not being split and trim comma-separated lists#424
kallioli wants to merge 1 commit into
cloudbase:masterfrom
kallioli:fix/extra-features-capabilities-split

Conversation

@kallioli

@kallioli kallioli commented Jun 5, 2026

Copy link
Copy Markdown

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: #422

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: cloudbase#422
@kallioli kallioli force-pushed the fix/extra-features-capabilities-split branch from 6afac20 to efdb418 Compare June 8, 2026 08:40
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.

extra_features and extra_capabilities are broken with Windows Server 2025 as host OS

1 participant