summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/kill.go4
-rw-r--r--cmd/podman/pod_kill.go4
-rw-r--r--cmd/podman/ps.go12
-rw-r--r--cmd/podman/shared/create.go5
4 files changed, 14 insertions, 11 deletions
diff --git a/cmd/podman/kill.go b/cmd/podman/kill.go
index aba2008ca..a10546ea9 100644
--- a/cmd/podman/kill.go
+++ b/cmd/podman/kill.go
@@ -3,7 +3,7 @@ package main
import (
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/pkg/adapter"
- "github.com/docker/docker/pkg/signal"
+ "github.com/containers/libpod/pkg/util"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/spf13/cobra"
@@ -54,7 +54,7 @@ func killCmd(c *cliconfig.KillValues) error {
// Check if the signalString provided by the user is valid
// Invalid signals will return err
- killSignal, err := signal.ParseSignal(c.Signal)
+ killSignal, err := util.ParseSignal(c.Signal)
if err != nil {
return err
}
diff --git a/cmd/podman/pod_kill.go b/cmd/podman/pod_kill.go
index 064946f72..9f696073d 100644
--- a/cmd/podman/pod_kill.go
+++ b/cmd/podman/pod_kill.go
@@ -6,7 +6,7 @@ import (
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/pkg/adapter"
- "github.com/docker/docker/pkg/signal"
+ "github.com/containers/libpod/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
@@ -60,7 +60,7 @@ func podKillCmd(c *cliconfig.PodKillValues) error {
if c.Signal != "" {
// Check if the signalString provided by the user is valid
// Invalid signals will return err
- sysSignal, err := signal.ParseSignal(c.Signal)
+ sysSignal, err := util.ParseSignal(c.Signal)
if err != nil {
return err
}
diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go
index 9fad0ea65..4ac779430 100644
--- a/cmd/podman/ps.go
+++ b/cmd/podman/ps.go
@@ -204,11 +204,15 @@ func checkFlagsPassed(c *cliconfig.PsValues) error {
if c.Last >= 0 && c.Latest {
return errors.Errorf("last and latest are mutually exclusive")
}
- // Quiet conflicts with size, namespace, and format with a Go template
+ // Quiet conflicts with size and namespace and is overridden by a Go
+ // template.
if c.Quiet {
- if c.Size || c.Namespace || (c.Flag("format").Changed &&
- c.Format != formats.JSONString) {
- return errors.Errorf("quiet conflicts with size, namespace, and format with go template")
+ if c.Size || c.Namespace {
+ return errors.Errorf("quiet conflicts with size and namespace")
+ }
+ if c.Flag("format").Changed && c.Format != formats.JSONString {
+ // Quiet is overridden by Go template output.
+ c.Quiet = false
}
}
// Size and namespace conflict with each other
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go
index c1c5db7cb..58cf56eea 100644
--- a/cmd/podman/shared/create.go
+++ b/cmd/podman/shared/create.go
@@ -24,7 +24,6 @@ import (
"github.com/containers/libpod/pkg/rootless"
cc "github.com/containers/libpod/pkg/spec"
"github.com/containers/libpod/pkg/util"
- "github.com/docker/docker/pkg/signal"
"github.com/docker/go-connections/nat"
"github.com/docker/go-units"
"github.com/opentracing/opentracing-go"
@@ -464,7 +463,7 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod.
signalString = c.String("stop-signal")
}
if signalString != "" {
- stopSignal, err = signal.ParseSignal(signalString)
+ stopSignal, err = util.ParseSignal(signalString)
if err != nil {
return nil, err
}
@@ -624,7 +623,7 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod.
}
if systemd {
if signalString == "" {
- stopSignal, err = signal.ParseSignal("RTMIN+3")
+ stopSignal, err = util.ParseSignal("RTMIN+3")
if err != nil {
return nil, errors.Wrapf(err, "error parsing systemd signal")
}