From efeefd14086f3d807305e22a9a679a2cfec996b7 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Fri, 19 Oct 2018 15:06:32 -0700 Subject: [PATCH] build: fix `getRemoteCommitSha` to only return the sha (#13699) --- tools/release/git/git-client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/release/git/git-client.ts b/tools/release/git/git-client.ts index 939e52e864a..56e01cfdcc7 100644 --- a/tools/release/git/git-client.ts +++ b/tools/release/git/git-client.ts @@ -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. */