fix: use golang.org/x/sys/execabs (#224)
Closes https://github.com/ooni/probe-engine/issues/1195
This commit is contained in:
parent
f53b3be66e
commit
18ca6d5f35
6 changed files with 25 additions and 20 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue