Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cli/cmd/encore/cmdutil/cmdutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"runtime"

"github.com/fatih/color"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/term"
"google.golang.org/grpc/status"

"encr.dev/cli/internal/manifest"
Expand Down Expand Up @@ -157,7 +157,7 @@ func DisplayError(out *os.File, err []byte) {

// Get the width of the terminal we're rendering in
// if we can so we render using the most space possible.
width, _, sizeErr := terminal.GetSize(int(out.Fd()))
width, _, sizeErr := term.GetSize(int(out.Fd()))
if sizeErr == nil {
errinsrc.TerminalWidth = width
}
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/encore/cmdutil/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/logrusorgru/aurora/v3"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/term"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

Expand Down Expand Up @@ -193,7 +193,7 @@ func FormatStack(val any, buf *bytes.Buffer) error {

func ClearTerminalExceptFirstNLines(n int) {
// Clear the screen except for the first line.
if _, height, err := terminal.GetSize(int(os.Stdout.Fd())); err == nil {
if _, height, err := term.GetSize(int(os.Stdout.Fd())); err == nil {
count := height - (1 + n)
if count > 0 {
_, _ = os.Stdout.Write(bytes.Repeat([]byte{'\n'}, count))
Expand Down
6 changes: 3 additions & 3 deletions cli/cmd/encore/secrets/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

"github.com/cockroachdb/errors"
"github.com/spf13/cobra"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/term"

"encr.dev/cli/cmd/encore/cmdutil"
"encr.dev/cli/internal/platform"
Expand Down Expand Up @@ -210,9 +210,9 @@ func (s secretEnvSelector) ParseSelector(ctx context.Context, appSlug string) []
func readSecretValue() string {
var value string
fd := syscall.Stdin
if terminal.IsTerminal(int(fd)) {
if term.IsTerminal(int(fd)) {
fmt.Fprint(os.Stderr, "Enter secret value: ")
data, err := terminal.ReadPassword(int(fd))
data, err := term.ReadPassword(int(fd))
if err != nil {
cmdutil.Fatal(err)
}
Expand Down