Skip to content

Commit

Permalink
Please remind me that linters are a Good Thing
Browse files Browse the repository at this point in the history
  • Loading branch information
webbnh committed Mar 28, 2024
1 parent abb5fcc commit 999bcf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ func GetCommmandCgroupNs(logger log.Logger, command string, args []string) strin
// GetPodmanCgroupNs detects the running container cgroup namespace
func GetPodmanCgroupNs(logger log.Logger, podmanPath string, containerName string) string {
var stdout bytes.Buffer
cmd := exec.Command(
cmd := exec.Command( //nolint:gosec
podmanPath, "ps", "--ns", "--filter",
fmt.Sprintf("name=%s", containerName),
"--format", "{{.CGROUPNS}}") //nolint:gosec
"--format", "{{.CGROUPNS}}")
cmd.Stdout = &stdout
if err := cmd.Run(); err != nil {
logger.Errorf(err.Error())
Expand Down

0 comments on commit 999bcf0

Please sign in to comment.