Skip to content

Commit

Permalink
make getBazelVersion func public (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
francine-blanc authored Nov 30, 2023
1 parent 82dba8f commit 9d3fc7d
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 9d3fc7d

Please sign in to comment.