mirror of https://github.com/containers/podman.git
fix new lint errors from the docker update
Some new deprecated fields, we still have to set them since clients might still use them. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
cf87278e66
commit
5786d5f846
|
@ -95,11 +95,16 @@ func GetEvents(w http.ResponseWriter, r *http.Request) {
|
||||||
e := entities.ConvertToEntitiesEvent(*evt.Event)
|
e := entities.ConvertToEntitiesEvent(*evt.Event)
|
||||||
// Some events differ between Libpod and Docker endpoints.
|
// Some events differ between Libpod and Docker endpoints.
|
||||||
// Handle these differences for Docker-compat.
|
// Handle these differences for Docker-compat.
|
||||||
if !utils.IsLibpodRequest(r) && e.Type == "image" && e.Status == "remove" {
|
if !utils.IsLibpodRequest(r) && e.Type == "image" && e.Action == "remove" {
|
||||||
|
// Status is deprecated, but we still like to set it for consumers that might use it.
|
||||||
|
//nolint:staticcheck,nolintlint // we run the linter several times and sometimes it
|
||||||
|
// complains about this and sometimes it doesn't thus the nolintlint
|
||||||
e.Status = "delete"
|
e.Status = "delete"
|
||||||
e.Action = "delete"
|
e.Action = "delete"
|
||||||
}
|
}
|
||||||
if !utils.IsLibpodRequest(r) && e.Status == "died" {
|
if !utils.IsLibpodRequest(r) && e.Action == "died" {
|
||||||
|
//nolint:staticcheck,nolintlint // we run the linter several times and sometimes it
|
||||||
|
// complains about this and sometimes it doesn't thus the nolintlint
|
||||||
e.Status = "die"
|
e.Status = "die"
|
||||||
e.Action = "die"
|
e.Action = "die"
|
||||||
e.Actor.Attributes["exitCode"] = e.Actor.Attributes["containerExitCode"]
|
e.Actor.Attributes["exitCode"] = e.Actor.Attributes["containerExitCode"]
|
||||||
|
|
|
@ -578,7 +578,6 @@ func makeExecConfig(options entities.ExecOptions) *handlers.ExecCreateConfig {
|
||||||
createConfig.AttachStdin = options.Interactive
|
createConfig.AttachStdin = options.Interactive
|
||||||
createConfig.AttachStdout = true
|
createConfig.AttachStdout = true
|
||||||
createConfig.AttachStderr = true
|
createConfig.AttachStderr = true
|
||||||
createConfig.Detach = false
|
|
||||||
createConfig.DetachKeys = options.DetachKeys
|
createConfig.DetachKeys = options.DetachKeys
|
||||||
createConfig.Env = env
|
createConfig.Env = env
|
||||||
createConfig.WorkingDir = options.WorkDir
|
createConfig.WorkingDir = options.WorkDir
|
||||||
|
|
Loading…
Reference in New Issue