This commit is contained in:
rob boll 2017-04-12 11:16:12 -04:00
parent 709195848a
commit 371ca7f752
2 changed files with 5 additions and 5 deletions

View File

@ -14,14 +14,14 @@ const (
) )
type execer struct { type execer struct {
writer io.Writer writer io.Writer
kubeContext string kubeContext string
extra []string extra []string
} }
func NewHelmExec(writer io.Writer, kubeContext string) Interface { func NewHelmExec(writer io.Writer, kubeContext string) Interface {
return &execer{ return &execer{
writer: writer, writer: writer,
kubeContext: kubeContext, kubeContext: kubeContext,
} }
} }
@ -75,7 +75,7 @@ func (helm *execer) exec(args ...string) ([]byte, error) {
} }
if helm.kubeContext != "" { if helm.kubeContext != "" {
cmdargs = append(cmdargs, "--kube-context", helm.kubeContext) cmdargs = append(cmdargs, "--kube-context", helm.kubeContext)
} }
if helm.writer != nil { if helm.writer != nil {
helm.writer.Write([]byte(fmt.Sprintf("exec: helm %s\n", strings.Join(cmdargs, " ")))) helm.writer.Write([]byte(fmt.Sprintf("exec: helm %s\n", strings.Join(cmdargs, " "))))
} }

View File

@ -1,13 +1,13 @@
package state package state
import ( import (
"errors"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
"strings" "strings"
"sync" "sync"
"errors"
"github.com/roboll/helmfile/helmexec" "github.com/roboll/helmfile/helmexec"