Skip to content

Commit 1b0b6bf

Browse files
committed
TUN-7589: Remove legacy golang.org/x/crypto/ssh/terminal package usage
Package has been moved to golang.org/x/term
1 parent 85eee48 commit 1b0b6bf

File tree

4 files changed

+4
-81
lines changed

4 files changed

+4
-81
lines changed

cmd/cloudflared/tunnel/configuration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/rs/zerolog"
1616
"github.com/urfave/cli/v2"
1717
"github.com/urfave/cli/v2/altsrc"
18-
"golang.org/x/crypto/ssh/terminal"
18+
"golang.org/x/term"
1919

2020
"github.com/cloudflare/cloudflared/cmd/cloudflared/cliutil"
2121
"github.com/cloudflare/cloudflared/config"
@@ -277,7 +277,7 @@ func gracePeriod(c *cli.Context) (time.Duration, error) {
277277
}
278278

279279
func isRunningFromTerminal() bool {
280-
return terminal.IsTerminal(int(os.Stdout.Fd()))
280+
return term.IsTerminal(int(os.Stdout.Fd()))
281281
}
282282

283283
// Remove any duplicates from the slice

cmd/cloudflared/updater/update.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/facebookgo/grace/gracenet"
1313
"github.com/rs/zerolog"
1414
"github.com/urfave/cli/v2"
15-
"golang.org/x/crypto/ssh/terminal"
15+
"golang.org/x/term"
1616

1717
"github.com/cloudflare/cloudflared/config"
1818
"github.com/cloudflare/cloudflared/logger"
@@ -304,7 +304,7 @@ func wasInstalledFromPackageManager() bool {
304304
}
305305

306306
func isRunningFromTerminal() bool {
307-
return terminal.IsTerminal(int(os.Stdout.Fd()))
307+
return term.IsTerminal(int(os.Stdout.Fd()))
308308
}
309309

310310
func IsSysV() bool {

vendor/golang.org/x/crypto/ssh/terminal/terminal.go

Lines changed: 0 additions & 76 deletions
This file was deleted.

vendor/modules.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ golang.org/x/crypto/pbkdf2
363363
golang.org/x/crypto/salsa20/salsa
364364
golang.org/x/crypto/ssh
365365
golang.org/x/crypto/ssh/internal/bcrypt_pbkdf
366-
golang.org/x/crypto/ssh/terminal
367366
# golang.org/x/exp v0.0.0-20221205204356-47842c84f3db
368367
## explicit; go 1.18
369368
golang.org/x/exp/constraints

0 commit comments

Comments
 (0)