File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed
Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ require (
1717 github.com/google/go-cmp v0.5.6
1818 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
1919 github.com/gorilla/websocket v1.4.2
20+ github.com/hashicorp/go-multierror v1.0.0
2021 github.com/hashicorp/go-version v1.3.0
2122 github.com/henvic/httpretty v0.0.6
2223 github.com/itchyny/gojq v0.12.6
Original file line number Diff line number Diff line change @@ -192,10 +192,12 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad
192192github.com/grpc-ecosystem/grpc-gateway v1.16.0 /go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw =
193193github.com/hashicorp/consul/api v1.1.0 /go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q =
194194github.com/hashicorp/consul/sdk v0.1.1 /go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8 =
195+ github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA =
195196github.com/hashicorp/errwrap v1.0.0 /go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4 =
196197github.com/hashicorp/go-cleanhttp v0.5.1 /go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80 =
197198github.com/hashicorp/go-immutable-radix v1.0.0 /go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60 =
198199github.com/hashicorp/go-msgpack v0.5.3 /go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM =
200+ github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o =
199201github.com/hashicorp/go-multierror v1.0.0 /go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk =
200202github.com/hashicorp/go-rootcerts v1.0.0 /go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU =
201203github.com/hashicorp/go-sockaddr v1.0.0 /go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU =
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import (
1616 "github.com/cli/cli/v2/internal/codespaces"
1717 "github.com/cli/cli/v2/pkg/cmdutil"
1818 "github.com/cli/cli/v2/pkg/liveshare"
19+ "github.com/hashicorp/go-multierror"
1920 "github.com/spf13/cobra"
2021)
2122
@@ -299,10 +300,12 @@ func (crwc *combinedReadWriteCloser) Write(p []byte) (n int, err error) {
299300}
300301
301302func (crwc * combinedReadWriteCloser ) Close () error {
302- werr := crwc .writer .Close ()
303- rerr := crwc .reader .Close ()
304- if werr {
305- return werr
303+ var errs error
304+ if err := crwc .writer .Close (); err != nil {
305+ errs = multierror .Append (errs , err )
306306 }
307- return rerr
307+ if err := crwc .reader .Close (); err != nil {
308+ errs = multierror .Append (errs , err )
309+ }
310+ return errs
308311}
You can’t perform that action at this time.
0 commit comments