mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
util: address golangci-lint issues
address golangci-lint issues in utils Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
8c4a38eec6
commit
4b7cafe821
@ -48,7 +48,7 @@ func ExecuteCommandWithNSEnter(ctx context.Context, netPath, program string, arg
|
||||
return "", "", fmt.Errorf("failed to get stat for %s %w", netPath, err)
|
||||
}
|
||||
// nsenter --net=%s -- <program> <args>
|
||||
args = append([]string{fmt.Sprintf("--net=%s", netPath), "--", program}, args...)
|
||||
args = append([]string{"--net=" + netPath, "--", program}, args...)
|
||||
sanitizedArgs := StripSecretInArgs(args)
|
||||
cmd := exec.Command(nsenter, args...) // #nosec:G204, commands executing not vulnerable.
|
||||
cmd.Stdout = &stdoutBuf
|
||||
|
Reference in New Issue
Block a user