Skip to content

Commit

Permalink
tools/tests: bump cobra to fix PrintErrln (#8021)
Browse files Browse the repository at this point in the history
close #8022

Signed-off-by: husharp <[email protected]>
  • Loading branch information
HuSharp authored Apr 3, 2024
1 parent a2b0e3c commit fff288d
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 253 deletions.
9 changes: 4 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ require (
github.com/shirou/gopsutil/v3 v3.23.3
github.com/smallnest/chanx v0.0.0-20221229104322-eb4c998d2072
github.com/soheilhy/cmux v0.1.5
github.com/spf13/cobra v1.0.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
github.com/swaggo/http-swagger v1.2.6
Expand Down Expand Up @@ -90,7 +90,7 @@ require (
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dnephin/pflag v1.0.7 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
Expand Down Expand Up @@ -125,7 +125,7 @@ require (
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69 // indirect
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/jonboulle/clockwork v0.2.2 // indirect
Expand Down Expand Up @@ -157,12 +157,11 @@ require (
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/rs/cors v1.7.0 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/samber/lo v1.37.0 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/shoenig/go-m1cpu v0.1.5 // indirect
github.com/shurcooL/httpgzip v0.0.0-20190720172056-320755c1c1b0 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/sirupsen/logrus v1.6.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2 // indirect
Expand Down
92 changes: 10 additions & 82 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions tests/integrations/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ require (
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69 // indirect
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/joho/godotenv v1.4.0 // indirect
Expand Down Expand Up @@ -142,7 +142,7 @@ require (
github.com/sirupsen/logrus v1.6.0 // indirect
github.com/smallnest/chanx v0.0.0-20221229104322-eb4c998d2072 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/spf13/cobra v1.0.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2 // indirect
Expand Down
89 changes: 8 additions & 81 deletions tests/integrations/go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.18.0
github.com/spf13/cobra v1.0.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
github.com/tikv/pd v0.0.0-00010101000000-000000000000
Expand Down Expand Up @@ -101,7 +101,7 @@ require (
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69 // indirect
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/joho/godotenv v1.4.0 // indirect
Expand Down
89 changes: 8 additions & 81 deletions tools/go.sum

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tools/pd-ctl/pdctl/ctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func MainStart(args []string) {
rootCmd.SetArgs(args)
rootCmd.ParseFlags(args)
rootCmd.SetOut(os.Stdout)
rootCmd.SetErr(os.Stderr)

if err := rootCmd.Execute(); err != nil {
rootCmd.Println(err)
Expand Down
1 change: 1 addition & 0 deletions tools/pd-ctl/tests/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
func ExecuteCommand(root *cobra.Command, args ...string) (output []byte, err error) {
buf := new(bytes.Buffer)
root.SetOut(buf)
root.SetErr(buf)
root.SetArgs(args)
err = root.Execute()
return buf.Bytes(), err
Expand Down

0 comments on commit fff288d

Please sign in to comment.