Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -23,19 +23,14 @@ func getPrefixAndSlashFromDaemonPlatform() (prefix, slash string) {
|
| 23 | 23 |
// TODO: update code to call cmd.RunCmd directly, and remove this function |
| 24 | 24 |
// Deprecated: use gotest.tools/icmd |
| 25 | 25 |
func runCommandWithOutput(execCmd *exec.Cmd) (string, int, error) {
|
| 26 |
- result := icmd.RunCmd(transformCmd(execCmd)) |
|
| 27 |
- return result.Combined(), result.ExitCode, result.Error |
|
| 28 |
-} |
|
| 29 |
- |
|
| 30 |
-// Temporary shim for migrating commands to the new function |
|
| 31 |
-func transformCmd(execCmd *exec.Cmd) icmd.Cmd {
|
|
| 32 |
- return icmd.Cmd{
|
|
| 26 |
+ result := icmd.RunCmd(icmd.Cmd{
|
|
| 33 | 27 |
Command: execCmd.Args, |
| 34 | 28 |
Env: execCmd.Env, |
| 35 | 29 |
Dir: execCmd.Dir, |
| 36 | 30 |
Stdin: execCmd.Stdin, |
| 37 | 31 |
Stdout: execCmd.Stdout, |
| 38 |
- } |
|
| 32 |
+ }) |
|
| 33 |
+ return result.Combined(), result.ExitCode, result.Error |
|
| 39 | 34 |
} |
| 40 | 35 |
|
| 41 | 36 |
// ParseCgroupPaths parses 'procCgroupData', which is output of '/proc/<pid>/cgroup', and returns |