Skip to content

Commit

Permalink
fix makesure command
Browse files Browse the repository at this point in the history
  • Loading branch information
ad3n committed Jul 16, 2022
1 parent cf8f659 commit a13f9cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

var (
version = "v1.2.17"
version = "v1.2.18"
protocMinVersion = 31900
protocGoMinVersion = 12800
protocGRpcMinVersion = 10200
Expand Down
16 changes: 1 addition & 15 deletions tool/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,7 @@ func (u util) Makesure(protoc int, protocGo int, protocGRpc int) error {
}

protocGoVersion := 0
output, err = exec.Command("protoc-gen-go", "--version").CombinedOutput()
if err != nil {
progress.Stop()
color.New(color.FgRed).Println("Protoc Gen Go is not installed")

return err
}

output, _ = exec.Command("protoc-gen-go", "--version").CombinedOutput()
vSlice = strings.Split(string(output), " ")
if len(vSlice) > 1 {
vSlice[1] = strings.TrimPrefix(vSlice[1], "v")
Expand All @@ -138,13 +131,6 @@ func (u util) Makesure(protoc int, protocGo int, protocGRpc int) error {

protocGRpcVersion := 0
output, err = exec.Command("protoc-gen-go-grpc", "--version").CombinedOutput()
if err != nil {
progress.Stop()
color.New(color.FgRed).Println("Protoc Gen Go gRPC is not installed")

return err
}

vSlice = strings.Split(string(output), " ")
if len(vSlice) > 1 {
vSlice = strings.Split(vSlice[1], ".")
Expand Down

0 comments on commit a13f9cb

Please sign in to comment.