summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-04-22 12:02:07 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-04-22 12:40:52 +0200
commit56d6ee0808d30c96289568724d748a0e85008638 (patch)
tree2d0cc57894a10a369375f126d226215a18264dfd /cmd/podman
parent2627345dd5b8550242033212e6481af970537510 (diff)
downloadpodman-56d6ee0808d30c96289568724d748a0e85008638.tar.gz
podman-56d6ee0808d30c96289568724d748a0e85008638.tar.bz2
podman-56d6ee0808d30c96289568724d748a0e85008638.zip
move golang.org/x/crypto/ssh/terminal to golang.org/x/term
golang.org/x/crypto/ssh/terminal is deprecated. The package was moved to golang.org/x/term. golang.org/x/crypto/ssh/terminal was already just calling golang.org/x/term itslef so there are no functional changes. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/containers/export.go4
-rw-r--r--cmd/podman/containers/run.go4
-rw-r--r--cmd/podman/images/load.go4
-rw-r--r--cmd/podman/images/save.go4
4 files changed, 8 insertions, 8 deletions
diff --git a/cmd/podman/containers/export.go b/cmd/podman/containers/export.go
index 0fed94e86..681df93e0 100644
--- a/cmd/podman/containers/export.go
+++ b/cmd/podman/containers/export.go
@@ -11,7 +11,7 @@ import (
"github.com/containers/podman/v4/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
- "golang.org/x/crypto/ssh/terminal"
+ "golang.org/x/term"
)
var (
@@ -69,7 +69,7 @@ func init() {
func export(cmd *cobra.Command, args []string) error {
if len(exportOpts.Output) == 0 {
file := os.Stdout
- if terminal.IsTerminal(int(file.Fd())) {
+ if term.IsTerminal(int(file.Fd())) {
return errors.Errorf("refusing to export to terminal. Use -o flag or redirect")
}
exportOpts.Output = "/dev/stdout"
diff --git a/cmd/podman/containers/run.go b/cmd/podman/containers/run.go
index 1d98eb3b3..4ad8d3183 100644
--- a/cmd/podman/containers/run.go
+++ b/cmd/podman/containers/run.go
@@ -18,7 +18,7 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
- "golang.org/x/crypto/ssh/terminal"
+ "golang.org/x/term"
)
var (
@@ -112,7 +112,7 @@ func run(cmd *cobra.Command, args []string) error {
var err error
// TODO: Breaking change should be made fatal in next major Release
- if cliVals.TTY && cliVals.Interactive && !terminal.IsTerminal(int(os.Stdin.Fd())) {
+ if cliVals.TTY && cliVals.Interactive && !term.IsTerminal(int(os.Stdin.Fd())) {
logrus.Warnf("The input device is not a TTY. The --tty and --interactive flags might not work properly")
}
diff --git a/cmd/podman/images/load.go b/cmd/podman/images/load.go
index 30f88b02b..6f85fb7e7 100644
--- a/cmd/podman/images/load.go
+++ b/cmd/podman/images/load.go
@@ -16,7 +16,7 @@ import (
"github.com/containers/podman/v4/pkg/util"
"github.com/pkg/errors"
"github.com/spf13/cobra"
- "golang.org/x/crypto/ssh/terminal"
+ "golang.org/x/term"
)
var (
@@ -90,7 +90,7 @@ func load(cmd *cobra.Command, args []string) error {
return err
}
} else {
- if terminal.IsTerminal(int(os.Stdin.Fd())) {
+ if term.IsTerminal(int(os.Stdin.Fd())) {
return errors.Errorf("cannot read from terminal. Use command-line redirection or the --input flag.")
}
outFile, err := ioutil.TempFile(util.Tmpdir(), "podman")
diff --git a/cmd/podman/images/save.go b/cmd/podman/images/save.go
index a9fe675e1..fb642bafd 100644
--- a/cmd/podman/images/save.go
+++ b/cmd/podman/images/save.go
@@ -14,7 +14,7 @@ import (
"github.com/containers/podman/v4/pkg/util"
"github.com/pkg/errors"
"github.com/spf13/cobra"
- "golang.org/x/crypto/ssh/terminal"
+ "golang.org/x/term"
)
var (
@@ -109,7 +109,7 @@ func save(cmd *cobra.Command, args []string) (finalErr error) {
if len(saveOpts.Output) == 0 {
saveOpts.Quiet = true
fi := os.Stdout
- if terminal.IsTerminal(int(fi.Fd())) {
+ if term.IsTerminal(int(fi.Fd())) {
return errors.Errorf("refusing to save to terminal. Use -o flag or redirect")
}
pipePath, cleanup, err := setupPipe()