diff --git a/runner/parser.go b/runner/parser.go index 6fd64a4b..8161a6e5 100644 --- a/runner/parser.go +++ b/runner/parser.go @@ -8,7 +8,7 @@ import ( // ParseCommand parses the command taking in account if the current // instance uses a shell to run the commands or just calls the binary -// directyly. +// directly. func ParseCommand(s *settings.Settings, raw string) ([]string, error) { var command []string @@ -26,7 +26,19 @@ func ParseCommand(s *settings.Settings, raw string) ([]string, error) { command = append(command, cmd) command = append(command, args...) } else { - command = append(s.Shell, raw) //nolint:gocritic + cmd, args, err := SplitCommandAndArgs(s.Shell[0]) + if err != nil { + return nil, err + } + + _, err = exec.LookPath(cmd) + if err != nil { + return nil, err + } + + command = append(command, cmd) + command = append(command, args...) + command = append(command, raw) } return command, nil