Skip to content

Commit 3eb38ed

Browse files
committed
make helm template wait to use CF with exex timeout
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
1 parent 9c8dfae commit 3eb38ed

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

util/helm/helm.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"os/exec"
99
"path/filepath"
1010
"strings"
11+
"syscall"
1112

1213
log "github.com/sirupsen/logrus"
1314
"sigs.k8s.io/yaml"
@@ -122,7 +123,15 @@ func Version() (string, error) {
122123
cmd := exec.Command("helm", "version", "--client", "--short")
123124
// example version output:
124125
// short: "v3.3.1+g249e521"
125-
version, err := executil.RunWithRedactor(cmd, redactor)
126+
opts := executil.ExecRunOpts{
127+
TimeoutBehavior: executil.TimeoutBehavior{
128+
Signal: syscall.SIGTERM,
129+
ShouldWait: true,
130+
},
131+
SkipErrorLogging: false,
132+
CaptureStderr: true,
133+
}
134+
version, err := executil.RunWithExecRunOpts(cmd, opts)
126135
if err != nil {
127136
return "", fmt.Errorf("could not get helm version: %w", err)
128137
}

0 commit comments

Comments
 (0)