Skip to content

Commit

Permalink
Allow to use args in editor option
Browse files Browse the repository at this point in the history
  • Loading branch information
mstrzele committed Aug 9, 2017
1 parent 5455432 commit 02526ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"io/ioutil"
"os"
"os/exec"
"strings"

"github.com/spf13/cobra"

Expand Down Expand Up @@ -94,7 +95,9 @@ func (e *editCmd) run() error {
return err
}

cmd := exec.Command(e.editor, tmpfile.Name())
editor := strings.Split(e.editor, " ")

cmd := exec.Command(editor[0], append(editor[1:], tmpfile.Name())...)
cmd.Stdin = os.Stdin
cmd.Stdout = e.out
cmd.Stderr = e.out
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euf -o pipefail

HELM_EDIT_VERSION=${HELM_EDIT_VERSION:-"0.1.0"}
HELM_EDIT_VERSION=${HELM_EDIT_VERSION:-"0.1.1"}

file="${HELM_PLUGIN_DIR:-"$(helm home)/plugins/helm-edit"}/helm-edit"
os=$(uname -s | tr '[:upper:]' '[:lower:]')
Expand Down

0 comments on commit 02526ef

Please sign in to comment.