diff options
author | Marco Vedovati <mvedovati@suse.com> | 2018-06-28 19:08:49 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-07-06 16:02:46 +0000 |
commit | 9eef9eb212cf4c3ec137de9db7eb8b67a8f6c351 (patch) | |
tree | d028cdc8f75dbc7f0ffc741f412d3a47979a8645 /cmd/podman/run.go | |
parent | cf2be66f526fcd1ab9f7a1a3f9af6582070ef791 (diff) | |
download | podman-9eef9eb212cf4c3ec137de9db7eb8b67a8f6c351.tar.gz podman-9eef9eb212cf4c3ec137de9db7eb8b67a8f6c351.tar.bz2 podman-9eef9eb212cf4c3ec137de9db7eb8b67a8f6c351.zip |
Refactor podman/utils with a single container start and attach function
Use a single function startAttachCtr() to handle both container start
with attach and attach to running containers, as the code handling the
attach is common for the 2 use cases.
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Closes: #1025
Approved by: rhatdan
Diffstat (limited to 'cmd/podman/run.go')
-rw-r--r-- | cmd/podman/run.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/run.go b/cmd/podman/run.go index 8eb747686..2964605f6 100644 --- a/cmd/podman/run.go +++ b/cmd/podman/run.go @@ -194,7 +194,7 @@ func runCmd(c *cli.Context) error { } } - if err := startAttachCtr(ctr, outputStream, errorStream, inputStream, c.String("detach-keys"), c.BoolT("sig-proxy")); err != nil { + if err := startAttachCtr(ctr, outputStream, errorStream, inputStream, c.String("detach-keys"), c.BoolT("sig-proxy"), true); err != nil { // This means the command did not exist exitCode = 127 if strings.Index(err.Error(), "permission denied") > -1 { |