DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Add new arg kind for extensions to receive list of dsc file extensions

Open SteveL-MSFT opened this issue 2 months ago • 0 comments

Summary of the new feature / enhancement

Discover extensions current need to have a hardcoded list of file extensions to look for. As file extensions get added in DSC (*.dsc.manifests.json and *.dsc.adaptedresource.json) it makes sense to pass these in dynamically at runtime so that extensions work with newly added file extensions.

Proposed technical implementation details (optional)

We add a new argKind for discovery extensions:

{
  "fileExtensionsArg": "<name of parameter to pass",
  "format": "[ json | commaSeparatedString ]"
}

For example, if your extension uses the exe foo, and this section of your manifest looks like:

"args": [
  "bar",
  {
    "fileExtensionsArg": "-ext",
    "format": "commaSeparatedString"
  }
]

Then DSC would execute: foo bar -ext "*.dsc.resource.json","*.dsc.resource.yaml","*.dsc.manifests.json"

(the full list would be larger)

SteveL-MSFT avatar Oct 21 '25 16:10 SteveL-MSFT