mirror of
https://github.com/helmfile/helmfile.git
synced 2026-09-30 20:41:38 +02:00
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user