From 794f87aa0d33a0b782fcb2726754fdc51bc1d73d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 20 Sep 2024 14:49:01 +0200 Subject: [PATCH] fix(cli): make CLI not require latest version of windmill --- cli/sync.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/cli/sync.ts b/cli/sync.ts index b19470ca1e..d770029c45 100644 --- a/cli/sync.ts +++ b/cli/sync.ts @@ -900,10 +900,14 @@ export async function pull(opts: GlobalOptions & SyncOptions) { ) ); - const resourceTypeToFormatExtension = - (await wmill.fileResourceTypeToFileExtMap({ + let resourceTypeToFormatExtension: Record = {}; + try { + resourceTypeToFormatExtension = (await wmill.fileResourceTypeToFileExtMap({ workspace: workspace.workspaceId, })) as Record; + } catch { + // ignore + } const remote = ZipFSElement( (await downloadZip( workspace, @@ -1195,10 +1199,14 @@ export async function push(opts: GlobalOptions & SyncOptions) { "Computing the files to update on the remote to match local (taking wmill.yaml includes/excludes into account)" ) ); - const resourceTypeToFormatExtension = - (await wmill.fileResourceTypeToFileExtMap({ + let resourceTypeToFormatExtension: Record = {}; + try { + resourceTypeToFormatExtension = (await wmill.fileResourceTypeToFileExtMap({ workspace: workspace.workspaceId, })) as Record; + } catch { + // ignore + } const remote = ZipFSElement( (await downloadZip( workspace,