mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: fix getRemoteCommitSha to only return the sha (#13699)
This commit is contained in:
@@ -19,7 +19,7 @@ export class GitClient {
|
||||
/** Gets the commit SHA for the specified remote repository branch. */
|
||||
getRemoteCommitSha(branchName: string): string {
|
||||
return spawnSync('git', ['ls-remote', this.remoteGitUrl, '-h', `refs/heads/${branchName}`],
|
||||
{cwd: this.projectDir}).stdout.toString().trim();
|
||||
{cwd: this.projectDir}).stdout.toString().split('\t')[0].trim();
|
||||
}
|
||||
|
||||
/** Gets the latest commit SHA for the specified git reference. */
|
||||
|
||||
Reference in New Issue
Block a user