Browse Source

Command -> LookPath

RPRX 5 years ago
parent
commit
2aedff1218
1 changed files with 1 additions and 1 deletions
  1. 1 1
      infra/vprotogen/main.go

+ 1 - 1
infra/vprotogen/main.go

@@ -26,7 +26,7 @@ func main() {
 	}
 	protoc := "protoc" + EXE
 
-	if err := exec.Command(protoc).Run(); err != nil {
+	if _, err := exec.LookPath(protoc); err != nil {
 		fmt.Println("Make sure that you have `" + protoc + "` in your system or current path, please visit https://github.com/protocolbuffers/protobuf/releases")
 		os.Exit(1)
 	}