From 1653d254fc5533d18c5d6e08d24b324b5117d40c Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Fri, 26 Apr 2024 09:33:33 -0600 Subject: [PATCH] fix: debug error instead of warn --- src/update.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/update.ts b/src/update.ts index f2db5381..3868badb 100644 --- a/src/update.ts +++ b/src/update.ts @@ -445,8 +445,12 @@ const determineCurrentVersion = async (clientBin: string, version: string): Prom const currentVersion = await readFile(clientBin, 'utf8') const matches = currentVersion.match(/\.\.[/\\|](.+)[/\\|]bin/) return matches ? matches[1] : version - } catch (error: unknown) { - ux.warn(error as Error | string) + } catch (error) { + if (error instanceof Error) { + ux.debug(error.name, error.message) + } else if (typeof error === 'string') { + ux.debug(error) + } } return version