Skip to content

Commit e863e8b

Browse files
authored
Fix error log (#123)
1 parent c76b286 commit e863e8b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/git.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ export const getPrBranchName = (
55
giteaMajorMinorVersion: string,
66
) => `backport-${prNumber}-v${giteaMajorMinorVersion}`;
77

8+
const decoder = new TextDecoder();
9+
810
export const initializeGitRepo = async (user: string, email: string | null) => {
911
await cmd.run("git", {
1012
args: [
@@ -76,7 +78,11 @@ export const cherryPickPr = async (
7678
});
7779

7880
if (!success) {
79-
console.error(`Cherry-pick failed:\n${stdout}\n${stderr}`.trim());
81+
console.error(
82+
`Cherry-pick failed:\n${decoder.decode(stdout)}\n${
83+
decoder.decode(stderr)
84+
}`.trim(),
85+
);
8086
await cmd.run("git", {
8187
cwd: "gitea",
8288
args: ["cherry-pick", "--abort"],

0 commit comments

Comments
 (0)