Skip to content

Commit

Permalink
fix: git branch is not resolved when using tags (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
vtsaplin committed Mar 11, 2024
1 parent 22efd42 commit 08c15ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/prompt-generator.js
Expand Up @@ -72,7 +72,9 @@ const getGitBranchName = async () => {
console.error(`Error: ${err}`);
return 'main';
}
resolve(stdout.replace(/(\r\n|\n|\r)/gm, ''));
const branchName = stdout.replace(/(\r\n|\n|\r)/gm, '').trim() || 'main';
console.log(`Using branch to replace GIT_BRANCH: ${branchName}`);
resolve(branchName);
});
});
};
Expand Down

0 comments on commit 08c15ad

Please sign in to comment.