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
|
|
@ -7,9 +7,10 @@ import (
|
|||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/sys/execabs"
|
||||
)
|
||||
|
||||
func fatalOnError(err error) {
|
||||
|
|
@ -70,7 +71,7 @@ func main() {
|
|||
options = append(options, *entry.Input)
|
||||
}
|
||||
log.Printf("run: go %s", strings.Join(options, " "))
|
||||
cmd := exec.Command("go", options...)
|
||||
cmd := execabs.Command("go", options...)
|
||||
cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr
|
||||
err = cmd.Run()
|
||||
fatalOnError(err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue