This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-11-21 17:22:40 -05:00
parent 3a6ab2a241
commit beb3e79c2a

View File

@ -41,7 +41,7 @@ YQ class >> install [
YQ class >> jsonToYaml: aDictionary [ YQ class >> jsonToYaml: aDictionary [
| jsonFile | | jsonFile |
self binaryFile exists ifFalse: [ YQ install]. self binaryFile exists ifFalse: [ YQ install].
jsonFile := MarkupFile exportAsFileOn: FileLocator temp / 'data.json' containing: aDictionary. jsonFile := MarkupFile exportAsFileOn: FileLocator temp / 'data.json' containing: (NeoJSONWriter toStringPretty: aDictionary).
Smalltalk os isWindows Smalltalk os isWindows
ifTrue: [ ^ LibC resultOfCommand: 'yq -p=json ', jsonFile fullName ]. ifTrue: [ ^ LibC resultOfCommand: 'yq -p=json ', jsonFile fullName ].
^ GtSubprocessWithInMemoryOutput new ^ GtSubprocessWithInMemoryOutput new