pkg/build: don't fail without compiler

Some OSes don't need a compiler.
Just return an empty string in such case.
This commit is contained in:
Dmitry Vyukov 2018-06-29 12:03:04 +02:00
parent ca1f32d15a
commit bdac5e17f1

View File

@ -68,6 +68,9 @@ func getBuilder(targetOS, targetArch, vmType string) (builder, error) {
}
func CompilerIdentity(compiler string) (string, error) {
if compiler == "" {
return "", nil
}
arg := "--version"
if strings.HasSuffix(compiler, "bazel") {
arg = ""