fix: use golang.org/x/sys/execabs (#224)
Closes https://github.com/ooni/probe-engine/issues/1195
This commit is contained in:
@@ -4,9 +4,10 @@ package shellx
|
||||
import (
|
||||
"errors"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/sys/execabs"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/google/shlex"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/model"
|
||||
@@ -22,7 +23,7 @@ type runconfig struct {
|
||||
|
||||
func run(config runconfig) error {
|
||||
config.loginfof("exec: %s %s", config.name, strings.Join(config.args, " "))
|
||||
cmd := exec.Command(config.name, config.args...)
|
||||
cmd := execabs.Command(config.name, config.args...)
|
||||
cmd.Stdout = config.stdout
|
||||
cmd.Stderr = config.stderr
|
||||
err := cmd.Run()
|
||||
|
||||
Reference in New Issue
Block a user