Skip to content

Commit

Permalink
Fix error log (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
yardenshoham authored Mar 28, 2024
1 parent c76b286 commit e863e8b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down Expand Up @@ -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"],
Expand Down

0 comments on commit e863e8b

Please sign in to comment.