From b9249544fc6d3b0bcbeea467ac9a7e1280a5c93f Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Tue, 28 Jan 2025 10:11:24 -0500 Subject: [PATCH] fix: restart command elegant --- api/src/unraid-api/cli/restart.command.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/unraid-api/cli/restart.command.ts b/api/src/unraid-api/cli/restart.command.ts index fc264f40e..f82faf67f 100644 --- a/api/src/unraid-api/cli/restart.command.ts +++ b/api/src/unraid-api/cli/restart.command.ts @@ -12,19 +12,19 @@ export class RestartCommand extends CommandRunner { async run(_): Promise { try { - this.logger.info('Restarting the Unraid API'); + this.logger.info('Restarting the Unraid API...'); const { stderr, stdout } = await execa(PM2_PATH, [ 'restart', ECOSYSTEM_PATH, '--update-env', ]); - this.logger.info('Unraid API restarted'); if (stderr) { this.logger.error(stderr); process.exit(1); - } - if (stdout) { + } else if (stdout) { this.logger.info(stdout); + } else { + this.logger.info('Unraid API restarted'); } } catch (error) { if (error instanceof Error) {