From 9302394c9fcbbbe1c7b8499ce0359761c6551e12 Mon Sep 17 00:00:00 2001 From: Innei Date: Fri, 16 Aug 2024 15:32:58 +0800 Subject: [PATCH] fix: error output Signed-off-by: Innei --- src/core/dry-run.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/dry-run.ts b/src/core/dry-run.ts index 9a3d694..86ad941 100644 --- a/src/core/dry-run.ts +++ b/src/core/dry-run.ts @@ -25,7 +25,13 @@ export const dryRun = async (pieces: TemplateStringsArray, ...args: any[]) => { }) return } - return $(pieces, ...args) + + try { + return await $(pieces, ...args) + } catch (p) { + console.log(`Exit code: ${p.exitCode}`) + console.log(p.stderr) + } } function substitute(arg) {