From 4a03ddd3f5b02956ba1ab24adb2a43e2d56ca561 Mon Sep 17 00:00:00 2001 From: David Cheung Date: Mon, 31 Jan 2022 13:25:58 -0500 Subject: [PATCH] trim git.defaultBranch linebreak from cmd output --- internal/vcs/create-git-repos.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/vcs/create-git-repos.go b/internal/vcs/create-git-repos.go index ff09bb52..d3da4119 100644 --- a/internal/vcs/create-git-repos.go +++ b/internal/vcs/create-git-repos.go @@ -165,7 +165,8 @@ func getInitDefaultBranch() string { return "main" } - return string(output) + branchName := strings.TrimSuffix(string(output), "\n") + return branchName } // doInitialCommit runs the git commands that initialize and do the first commit to a repository.