From d795d868fe6a6b0ee62d64041fdcafae9b80ebf4 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 4 May 2023 08:36:19 +0200 Subject: [PATCH] fix cli in yaml mode --- cli/sync.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cli/sync.ts b/cli/sync.ts index 864796719a..8fdfbc5748 100644 --- a/cli/sync.ts +++ b/cli/sync.ts @@ -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,