Skip to content

Commit

Permalink
Resolve cannot run exec found relative to cur dir error
Browse files Browse the repository at this point in the history
  • Loading branch information
TeddiO committed Aug 29, 2024
1 parent e1684b2 commit d39aac8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/utils/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d39aac8

Please sign in to comment.