parent
543a653864
commit
fcbd6aff29
|
|
@ -1,8 +1,6 @@
|
|||
package helmexec
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
|
|
@ -21,13 +19,6 @@ type ShellRunner struct{}
|
|||
|
||||
// Execute a shell command
|
||||
func (shell ShellRunner) Execute(cmd string, args []string) ([]byte, error) {
|
||||
dir, err := ioutil.TempDir("", tmpPrefix+cmd+tmpSuffix)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer os.RemoveAll(dir)
|
||||
|
||||
preparedCmd := exec.Command(cmd, args...)
|
||||
preparedCmd.Dir = dir
|
||||
return preparedCmd.CombinedOutput()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue