vscode-bazel icon indicating copy to clipboard operation
vscode-bazel copied to clipboard

getDefaultBazelExecutablePath() returns empty string

Open ashi009 opened this issue 5 years ago • 2 comments

I have an empty setting for bazel.executable and the build task failed due to "build: command not found". After manually set bazel.executable to "bazel", build task works. I believe that getDefaultBazelExecutablePath() returns an empty string for some reason (though the code looks sane to me).

Please consider setting "bazel" as the default for bazel.executable or using WorkspaceConfiguration.get<T>(section: string, defaultValue: T) instead.

This is also the case for bazel.buildifierExecutable.

image

image

ashi009 avatar Apr 12 '19 14:04 ashi009

The code tries to handle this already, for the 0.1.0 release it should be hitting: http://go/gh/bazelbuild/vscode-bazel/blob/0.1.0/src/bazel/bazel_command.ts#L96

Can you trace through there, what are you getting back that the check for a zero length string isn't working?

thomasvl avatar Apr 15 '19 19:04 thomasvl

Was this ever resolved?

allevato avatar Sep 24 '19 16:09 allevato