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 2615000 commit 398a2c5Copy full SHA for 398a2c5
execext/exec.go
@@ -24,8 +24,6 @@ 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
@@ -34,7 +32,7 @@ func RunCommand(opts *RunCommandOptions) error {
34
32
return ErrNilOptions
35
33
}
36
37
- p, err := parser.Parse(strings.NewReader(opts.Command), "")
+ p, err := syntax.NewParser().Parse(strings.NewReader(opts.Command), "")
38
if err != nil {
39
return err
40
0 commit comments