build: fix getRemoteCommitSha to only return the sha (#13699)

This commit is contained in:
Joey Perrott
2018-10-19 15:06:32 -07:00
committed by GitHub
parent 2f1578478e
commit efeefd1408
+1 -1
View File
@@ -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. */