From 2e4b171998b9b0afe9e56bb0c2f4d530b7a67ee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=BE=E6=98=8E=E5=81=A5?= Date: Thu, 15 Sep 2022 02:49:08 +0800 Subject: [PATCH] fix: mute error by default --- source/main.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/main.ts b/source/main.ts index 8a375f1e..12f27ac3 100755 --- a/source/main.ts +++ b/source/main.ts @@ -133,9 +133,10 @@ for (const endpoint of args['--listen']) { await clipboard.write(local); message += `\n\n${chalk.grey('Copied local address to clipboard!')}`; } catch (error: unknown) { - logger.error( - `Cannot copy server address to clipboard: ${(error as Error).message}.`, - ); + if (args['--debug']) + logger.error( + `Cannot copy server address to clipboard: ${(error as Error).message}.`, + ); } }