Skip to content

JSON created by Export-CrescendoCommand can not be read by Export-CrescendoModule #155

@jhoneill

Description

@jhoneill

Export-CrescendoCommand calls the ExportConfigurationFile method of the command object.
This generates json which looks like this

{
  "Verb": "Install",
   ...
}

Export-CrescendoModule expects to find JSON which looks like this

{
  "Commands": [
    {
      "Verb": "Install",
      ...
    }
  ]
}

Unless the command definitions are in an array the Export-CrescendoModule generates an error

InvalidOperation: You cannot call a method on a null-valued expression.

Granted anyone generating code with Export-CrescendoCommand can hack the JSON file, but (IMHO) that should not be required
edit crucial word was missing from the last sentence

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions