File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import (
1111
1212 "cdr.dev/wsep"
1313 "github.com/spf13/pflag"
14- "golang.org/x/crypto/ssh/terminal "
14+ "golang.org/x/term "
1515 "nhooyr.io/websocket"
1616
1717 "go.coder.com/cli"
@@ -83,7 +83,7 @@ func do(fl *pflag.FlagSet, tty bool) {
8383 signal .Notify (ch , syscall .SIGWINCH )
8484 go func () {
8585 for range ch {
86- width , height , err := terminal .GetSize (int (os .Stdin .Fd ()))
86+ width , height , err := term .GetSize (int (os .Stdin .Fd ()))
8787 if err != nil {
8888 continue
8989 }
@@ -92,11 +92,11 @@ func do(fl *pflag.FlagSet, tty bool) {
9292 }()
9393 ch <- syscall .SIGWINCH
9494
95- oldState , err := terminal .MakeRaw (int (os .Stdin .Fd ()))
95+ oldState , err := term .MakeRaw (int (os .Stdin .Fd ()))
9696 if err != nil {
9797 flog .Fatal ("failed to make terminal raw for tty: %w" , err )
9898 }
99- defer terminal .Restore (int (os .Stdin .Fd ()), oldState )
99+ defer term .Restore (int (os .Stdin .Fd ()), oldState )
100100 }
101101
102102 go io .Copy (os .Stdout , process .Stdout ())
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ require (
99 github.com/spf13/pflag v1.0.5
1010 go.coder.com/cli v0.4.0
1111 go.coder.com/flog v0.0.0-20190906214207-47dd47ea0512
12- golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413
1312 golang.org/x/sync v0.0.0-20190423024810-112230192c58
13+ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1
1414 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
1515 nhooyr.io/websocket v1.8.6
1616)
Original file line number Diff line number Diff line change @@ -222,6 +222,10 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w
222222golang.org/x/sys v0.0.0-20191210023423-ac6580df4449 /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
223223golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg =
224224golang.org/x/sys v0.0.0-20200116001909-b77594299b42 /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
225+ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw =
226+ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
227+ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E =
228+ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 /go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo =
225229golang.org/x/text v0.3.0 /go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ =
226230golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 /go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ =
227231golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs =
You can’t perform that action at this time.
0 commit comments