From bc8ce868cf1cdd8e6d1f1b2099f1d9c958703871 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Fri, 19 Oct 2018 14:52:56 -0700 Subject: [PATCH] build: fix `getRemoteCommitSha` to only return the sha --- 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 939e52e864ad..56e01cfdcc7a 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. */