Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make getBazelVersion func public #500

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func RunBazeliskWithArgsFuncAndConfig(argsFunc ArgsFunc, repos *Repositories, co
return -1, fmt.Errorf("could not create directory %s: %v", bazeliskHome, err)
}

bazelVersionString, err := getBazelVersion(config)
bazelVersionString, err := GetBazelVersion(config)
if err != nil {
return -1, fmt.Errorf("could not get Bazel version: %v", err)
}
Expand Down Expand Up @@ -230,7 +230,7 @@ func cutString(s, sep string) (before, after string, found bool) {
return s, "", false
}

func getBazelVersion(config config.Config) (string, error) {
func GetBazelVersion(config config.Config) (string, error) {
// Check in this order:
// - env var "USE_BAZEL_VERSION" is set to a specific version.
// - workspace_root/.bazeliskrc exists -> read contents, in contents:
Expand Down