No option to patch with properties
hajtomoto opened this issue · 1 comments
hajtomoto commented
Are you reporting a bug or a feature request ?
- Bug
- Feature request
Description
So I can patch my xml file with whatever I want and its working fine if I only want to replace/add value e.g.
JsonPatchContent: '+ /configuration/environmentVariable => "TEST"'
will create:
<environmentVariable>TEST</environmentVariable>
But what I would like to create is environmentVariable with properties as bellow:
<environmentVariable name="TEST" value="1234" />
Unless I missed smth or instructions are not clear enough, I cannot achieve that using current xml file patch.
sandorfr commented
Hi @hajtomoto,
The following should work for you:
+ /configuration/environmentVariable => { "@name" : "TEST", "@value": "1234" }
You can also have a look at the tests for more examples https://github.com/geeklearningio/gl-vsts-tasks-file-patch/blob/master/Tests/XmlPatch/xmlPatcher.spec.ts