From 564076c0ebc0bf0c82681e4491e38bbf0a5803a9 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Thu, 7 Mar 2024 13:11:30 -0500 Subject: [PATCH] fix: Replace ALL cwd instances --- src/pretty.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pretty.ts b/src/pretty.ts index 0bcbc2c..69467fd 100644 --- a/src/pretty.ts +++ b/src/pretty.ts @@ -11,8 +11,8 @@ export const prettyOptsFactory = (opts: PrettyOptions = {}): PrettyOptions => { nodes.push(leaf); } const labelContent = nodes.length === 0 ? '' : `${nodes.map((x: string) => colors.blackBright(`[${x}]`)).join(' ')} `; - const msg = log[messageKey]; - const stackTrace = log.err !== undefined ? `\n${(log.err as any).stack.replace(CWD, 'CWD')}` : ''; + const msg = (log[messageKey] as string).replaceAll(CWD, 'CWD'); + const stackTrace = log.err !== undefined ? `\n${(log.err as any).stack.replaceAll(CWD, 'CWD')}` : ''; return `${labelContent}${msg}${stackTrace}`; }, hideObject: false, -- 2.51.2