From 0a9714acfc2637c2005b51bf9e371a288d1eaa49 Mon Sep 17 00:00:00 2001 From: Jeff Hansen Date: Tue, 25 Aug 2020 10:38:29 -0400 Subject: [PATCH] fix: use NiceLogger in exitWithError Also just triggering the initial release. --- src/InteractiveApproval.ts | 6 ++++++ src/cli/cli.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/InteractiveApproval.ts b/src/InteractiveApproval.ts index 399ed14..ed31c0b 100644 --- a/src/InteractiveApproval.ts +++ b/src/InteractiveApproval.ts @@ -34,6 +34,9 @@ export interface InteractiveApprovalDriver { onError(message: string): void } +/** + * Prompt response. + */ export interface PromptResponse { /** * Selected Pulls to approve. @@ -59,6 +62,9 @@ export interface InteractiveApprovalResult { failedPulls: Pull[] } export const InteractiveApprovalResult = { + /** + * Empty result. + */ empty: { approvedPulls: [], failedPulls: [], diff --git a/src/cli/cli.ts b/src/cli/cli.ts index be1cb0b..38b1ee4 100644 --- a/src/cli/cli.ts +++ b/src/cli/cli.ts @@ -121,6 +121,6 @@ function printHelp() { * @param message */ function exitWithError(message: string): never { - console.error(message) + NiceLogger.error(message) process.exit(1) }