From e279c2eea770e58bfa02e365e4af92be915df329 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 3 Oct 2024 21:31:03 +0200 Subject: [PATCH] fix(cli): fix opts.yes for instance sync --- cli/instance.ts | 2 ++ cli/sync.ts | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cli/instance.ts b/cli/instance.ts index 69a69619ea..6ad60ad113 100644 --- a/cli/instance.ts +++ b/cli/instance.ts @@ -336,6 +336,7 @@ async function instancePull(opts: GlobalOptions & InstanceSyncOptions) { includeSettings: true, includeUsers: true, includeKey: true, + yes: opts.yes, }); } @@ -489,6 +490,7 @@ async function instancePush(opts: GlobalOptions & InstanceSyncOptions) { includeSettings: true, includeUsers: true, includeKey: true, + yes: opts.yes, }); } diff --git a/cli/sync.ts b/cli/sync.ts index 088571362d..3a12272b6e 100644 --- a/cli/sync.ts +++ b/cli/sync.ts @@ -504,7 +504,7 @@ function ZipFSElement( if (formatExtension) { const fileContent: string = parsed["value"]["content"]; - if (typeof(fileContent) === "string") { + if (typeof fileContent === "string") { r.push({ isDirectory: false, path: @@ -948,7 +948,7 @@ export async function pull(opts: GlobalOptions & SyncOptions) { if ( !opts.yes && !(await Confirm.prompt({ - message: `Do you want to apply these ${changes.length} changes?`, + message: `Do you want to apply these ${changes.length} changes to your local files?`, default: true, })) ) { @@ -1251,7 +1251,7 @@ export async function push(opts: GlobalOptions & SyncOptions) { if ( !opts.yes && !(await Confirm.prompt({ - message: `Do you want to apply these ${changes.length} changes?`, + message: `Do you want to apply these ${changes.length} changes to the remote?`, default: true, })) ) {