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

fix: ensure the workspaceRoot is set before running Bazel #127

Merged
merged 1 commit into from
Jan 29, 2022

Conversation

alexeagle
Copy link
Member

Otherwise some of our commands don't tell bazelisk how to find the .bazelversion file, and we run the wrong Bazel.
This results in churning the Bazel server when running these aspect commands, and is clearly wrong for users as well.

Otherwise some of our commands don't tell bazelisk how to find the .bazelversion file, and we run the wrong Bazel.
This results in churning the Bazel server when running these aspect commands, and is clearly wrong for users as well.
@@ -51,6 +51,10 @@ func (b *bazel) Spawn(command []string) (int, error) {

func (b *bazel) RunCommand(command []string, out io.Writer) (int, error) {
repos := b.createRepositories()
if len(b.workspaceRoot) < 1 {
panic("Illegal state: running bazel without the workspaceRoot set")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@f0rmiga f0rmiga merged commit bf0a7e1 into main Jan 29, 2022
@f0rmiga f0rmiga deleted the check_labels branch January 29, 2022 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants