Merge branch 'main' into fix/container-interface

This commit is contained in:
nils måsén 2023-04-12 17:17:28 +02:00 committed by GitHub
commit f28ffc611f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 1207 additions and 486 deletions

View file

@ -2,7 +2,6 @@ package actions
import (
"errors"
"strings"
"github.com/containrrr/watchtower/internal/util"
"github.com/containrrr/watchtower/pkg/container"
@ -260,10 +259,6 @@ func UpdateImplicitRestart(containers []types.Container) {
// container marked for restart
func linkedContainerMarkedForRestart(links []string, containers []types.Container) string {
for _, linkName := range links {
// Since the container names need to start with '/', let's prepend it if it's missing
if !strings.HasPrefix(linkName, "/") {
linkName = "/" + linkName
}
for _, candidate := range containers {
if candidate.Name() == linkName && candidate.ToRestart() {
return linkName