fix cli in yaml mode

This commit is contained in:
Ruben Fiszel
2023-05-04 08:36:19 +02:00
parent af3c89efc4
commit d795d868fe
+6 -1
View File
@@ -622,7 +622,12 @@ async function push(
`Adding ${getTypeStrFromPath(change.path)} ${change.path}`
);
}
const obj = inferTypeFromPath(change.path, JSON.parse(change.content));
const obj = inferTypeFromPath(
change.path,
change.path.endsWith(".yaml")
? yamlParse(change.content)
: JSON.parse(change.content)
);
const diff = microdiff({}, obj, { cyclesFix: false });
await applyDiff(
workspace.workspaceId,