Skip to content

Commit 0f2eecc

Browse files
authored
trim git.defaultBranch linebreak from cmd output (#455)
1 parent 75d3c9f commit 0f2eecc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/vcs/create-git-repos.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ func getInitDefaultBranch() string {
165165
return "main"
166166
}
167167

168-
return string(output)
168+
branchName := strings.TrimSuffix(string(output), "\n")
169+
return branchName
169170
}
170171

171172
// doInitialCommit runs the git commands that initialize and do the first commit to a repository.

0 commit comments

Comments
 (0)