From e863e8b9bac2b47a8d29a5b481ef11b58bfb675f Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Thu, 28 Mar 2024 11:38:12 +0200 Subject: [PATCH] Fix error log (#123) --- src/git.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/git.ts b/src/git.ts index bd3b404..405a1c7 100644 --- a/src/git.ts +++ b/src/git.ts @@ -5,6 +5,8 @@ export const getPrBranchName = ( giteaMajorMinorVersion: string, ) => `backport-${prNumber}-v${giteaMajorMinorVersion}`; +const decoder = new TextDecoder(); + export const initializeGitRepo = async (user: string, email: string | null) => { await cmd.run("git", { args: [ @@ -76,7 +78,11 @@ export const cherryPickPr = async ( }); if (!success) { - console.error(`Cherry-pick failed:\n${stdout}\n${stderr}`.trim()); + console.error( + `Cherry-pick failed:\n${decoder.decode(stdout)}\n${ + decoder.decode(stderr) + }`.trim(), + ); await cmd.run("git", { cwd: "gitea", args: ["cherry-pick", "--abort"],