From d39aac85723cca086cf12005cb48c21ceabe21cd Mon Sep 17 00:00:00 2001 From: Chris <1713740+TeddiO@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:10:49 +0100 Subject: [PATCH] Resolve cannot run exec found relative to cur dir error --- pkg/utils/util.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/utils/util.go b/pkg/utils/util.go index a535eb5b..d0db7fda 100644 --- a/pkg/utils/util.go +++ b/pkg/utils/util.go @@ -108,6 +108,11 @@ func Cwd() string { // RunCommand runs the specified command func RunCommand(command []string, env []string, inFile io.Reader, outFile io.Writer, errFile io.Writer, forwardSignals bool) (*exec.Cmd, error) { cmd := exec.Command(command[0], command[1:]...) // #nosec G204 nosemgrep: semgrep_configs.prohibit-exec-command + // Resolves https://github.com/DopplerHQ/cli/issues/415 + if errors.Is(cmd.Err, exec.ErrDot) { + cmd.Err = nil + } + cmd.Env = env cmd.Stdin = inFile cmd.Stdout = outFile