Can't default to GITHUB_REF_NAME during testing

This commit is contained in:
Paul Hatcherian 2023-09-30 09:27:44 -04:00
parent f53462a96e
commit 8d3552d384
4 changed files with 4 additions and 10 deletions

View file

@ -25,9 +25,7 @@ export class DefaultCurrentCommitResolver implements CurrentCommitResolver {
public async ResolveBranchNameAsync(): Promise<string> {
const branchName =
this.branch == 'HEAD' ?
process.env.GITHUB_REF_NAME || await cmd('git', 'rev-parse', '--abbrev-ref', 'HEAD')
: this.branch;
this.branch == 'HEAD' ? await cmd('git', 'rev-parse', '--abbrev-ref', 'HEAD') : this.branch;
return branchName.trim();