From 179a6e8a96b5daaf1aa4ee436c0f390993be97f0 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Fri, 20 Nov 2020 16:17:09 +0100 Subject: [PATCH] SyncCommand: Pass allowThrowOnError to fullSync This intends to make explicit calls to bw sync throw if the syncing can not be performed, fixes https://github.com/bitwarden/cli/issues/129. --- src/commands/sync.command.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/sync.command.ts b/src/commands/sync.command.ts index d7c198715e..8a4006f24d 100644 --- a/src/commands/sync.command.ts +++ b/src/commands/sync.command.ts @@ -15,11 +15,11 @@ export class SyncCommand { } try { - const result = await this.syncService.fullSync(cmd.force || false); + const result = await this.syncService.fullSync(cmd.force || false, true); const res = new MessageResponse('Syncing complete.', null); return Response.success(res); } catch (e) { - return Response.error(e); + return Response.error('Syncing failed: ' + e.toString()); } }