From 71b78070f4d7781c73d1d4fa1860dcc2d8051c88 Mon Sep 17 00:00:00 2001 From: Sunggun Yu Date: Thu, 16 Nov 2023 16:05:10 -0500 Subject: [PATCH] fix: shell substitution error with exit status 127 (#88) * fix: shell substitution error with exit status 127 --- internal/shell/shell.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/shell/shell.go b/internal/shell/shell.go index 36f378b..32e6426 100644 --- a/internal/shell/shell.go +++ b/internal/shell/shell.go @@ -144,6 +144,7 @@ func processCommandSubstitutionValue(val string, envs config.Envs) (string, erro script := strings.TrimSpace(matches[1]) cmd := exec.Command("sh", "-c", script) // append envs to cmd that runs command substitution as well to support the case that reuse env var as ref with substitution + cmd.Env = os.Environ() cmd.Env = append(cmd.Env, envs.Strings()...) // output, err := cmd.CombinedOutput()