diff options
author | Matthew Heon <matthew.heon@pm.me> | 2020-07-23 11:57:34 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2020-07-23 12:02:28 -0400 |
commit | 099649ac1b8d6933ab2ad5c725c4e4de8e1608f3 (patch) | |
tree | b84078c250534d9194a86881123bb91a4dbe9b18 | |
parent | 80add2902cf3561d2c9f91dc045076519cd297d5 (diff) | |
download | podman-099649ac1b8d6933ab2ad5c725c4e4de8e1608f3.tar.gz podman-099649ac1b8d6933ab2ad5c725c4e4de8e1608f3.tar.bz2 podman-099649ac1b8d6933ab2ad5c725c4e4de8e1608f3.zip |
The `podman start --attach` command should not print ID
Somewhere in the Podman v2 rewrite, we allowed
`podman start --attach` to print the container ID of the started
container after exiting from the attach session (via detach key
or the container exiting naturally). We should never print the ID
when `--attach` is given, which makes the fix simple - make the
print statement conditional on `--attach` not being present.
Wierdly, this only happened with `--interactive` was given to
`podman start`. I don't know why that is, but this resolves the
issue without having to dig any deeper, so I'm content.
Fixes #7055
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
-rw-r--r-- | cmd/podman/containers/start.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/containers/start.go b/cmd/podman/containers/start.go index 21f22b986..8f9984421 100644 --- a/cmd/podman/containers/start.go +++ b/cmd/podman/containers/start.go @@ -99,7 +99,7 @@ func start(cmd *cobra.Command, args []string) error { } for _, r := range responses { - if r.Err == nil { + if r.Err == nil && !startOptions.Attach { fmt.Println(r.RawInput) } else { errs = append(errs, r.Err) |