From 38c320e96523f596f63fde6ed3668f167e797cb2 Mon Sep 17 00:00:00 2001 From: Eric Doughty-Papassideris Date: Tue, 26 Mar 2024 12:06:22 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20CLI=20app=20startup=20(#43?= =?UTF-8?q?8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../node/src/cli/cmds/search_cmds/index_all.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tdrive/backend/node/src/cli/cmds/search_cmds/index_all.ts b/tdrive/backend/node/src/cli/cmds/search_cmds/index_all.ts index 30252f3d..e3fa0ef8 100644 --- a/tdrive/backend/node/src/cli/cmds/search_cmds/index_all.ts +++ b/tdrive/backend/node/src/cli/cmds/search_cmds/index_all.ts @@ -32,7 +32,7 @@ class SearchIndexAll { const repository = repositories.get(options.repository); if (!repository) { throw ( - "No such repository ready for indexation, available are: " + + "No repository set (or valid) ready for indexation, available are: " + Array.from(repositories.keys()).join(", ") ); } @@ -100,6 +100,7 @@ const services = [ "storage", "tracker", "websocket", + "email-pusher", ]; const command: yargs.CommandModule = { @@ -107,7 +108,6 @@ const command: yargs.CommandModule = { describe: "command to reindex search middleware from db entities", builder: { repository: { - default: "", type: "string", description: "Choose a repository to reindex", }, @@ -117,7 +117,6 @@ const command: yargs.CommandModule = { description: "Choose to repair entities too when possible", }, }, - // eslint-disable-next-line @typescript-eslint/no-unused-vars handler: async argv => { const spinner = ora({ text: "Reindex repository - " }).start(); const platform = await tdrive.run(services); @@ -126,17 +125,12 @@ const command: yargs.CommandModule = { const repository = (argv.repository || "") as string; - if (!repository) { - throw "No repository was set."; - } - + // Let this run even without a repository as its error message includes valid repository names await migrator.run({ repository, }); spinner.stop(); - - return; }, };