We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 504723b commit c9a64feCopy full SHA for c9a64fe
execext/exec.go
@@ -24,6 +24,8 @@ type RunCommandOptions struct {
24
var (
25
// ErrNilOptions is returned when a nil options is given
26
ErrNilOptions = errors.New("execext: nil options given")
27
+
28
+ parser = syntax.NewParser()
29
)
30
31
// RunCommand runs a shell command
@@ -32,7 +34,7 @@ func RunCommand(opts *RunCommandOptions) error {
32
34
return ErrNilOptions
33
35
}
36
- p, err := syntax.Parse(strings.NewReader(opts.Command), "", 0)
37
+ p, err := parser.Parse(strings.NewReader(opts.Command), "")
38
if err != nil {
39
return err
40
0 commit comments