File tree 3 files changed +10
-3
lines changed
3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,10 @@ func (c *defaultClient) Login() {
198
198
}
199
199
defer terminal .Restore (fd , state )
200
200
201
- w , h , err := terminal .GetSize (fd )
201
+ //changed fd to int(os.Stdout.Fd()) becaused terminal.GetSize(fd) doesn't work in Windows
202
+ //refrence: https://github.com/golang/go/issues/20388
203
+ w , h , err := terminal .GetSize (int (os .Stdout .Fd ()))
204
+
202
205
if err != nil {
203
206
l .Error (err )
204
207
return
Original file line number Diff line number Diff line change @@ -12,6 +12,6 @@ require (
12
12
13
13
require (
14
14
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
15
- golang.org/x/sys v0.28 .0 // indirect
16
- golang.org/x/term v0.27 .0 // indirect
15
+ golang.org/x/sys v0.31 .0 // indirect
16
+ golang.org/x/term v0.30 .0 // indirect
17
17
)
Original file line number Diff line number Diff line change @@ -15,8 +15,12 @@ golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ss
15
15
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b /go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY =
16
16
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA =
17
17
golang.org/x/sys v0.28.0 /go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA =
18
+ golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik =
19
+ golang.org/x/sys v0.31.0 /go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k =
18
20
golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q =
19
21
golang.org/x/term v0.27.0 /go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM =
22
+ golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y =
23
+ golang.org/x/term v0.30.0 /go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g =
20
24
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM =
21
25
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 /go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0 =
22
26
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY =
You can’t perform that action at this time.
0 commit comments