Skip to content

Commit

Permalink
Readd the logPath to the list
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinando Formica <[email protected]>
  • Loading branch information
fformica committed Feb 27, 2024
1 parent 5afb4c7 commit 949545e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/crictl/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,9 @@ var removeContainerCommand = &cli.Command{
if logPath != "" {
logRotations, err := filepath.Glob(logPath + ".*")
if err != nil {
logRotations = []string{logPath}
logRotations = []string{}
}
logRotations = append(logRotations, logPath)

for _, logFile := range logRotations {
err = os.Remove(logFile)
Expand Down

0 comments on commit 949545e

Please sign in to comment.