all: use x/sys/execabs instead of os/exec

Closes #2418
This commit is contained in:
Hajime Hoshi 2022-11-01 23:07:16 +09:00
parent 083835af9a
commit 8aacf067dd
5 changed files with 6 additions and 5 deletions

View File

@ -23,10 +23,10 @@ import (
"fmt"
"log"
"os"
"os/exec"
"path/filepath"
"strings"
exec "golang.org/x/sys/execabs"
"golang.org/x/tools/go/packages"
)

View File

@ -18,13 +18,13 @@ import (
_ "embed"
"fmt"
"os"
"os/exec"
"path/filepath"
"runtime"
"runtime/debug"
// Add a dependency on gomobile in order to get the version via debug.ReadBuildInfo().
_ "golang.org/x/mobile/geom"
exec "golang.org/x/sys/execabs"
)
//go:embed gobind.go

View File

@ -25,11 +25,11 @@ import (
"fmt"
"log"
"os"
"os/exec"
"path/filepath"
"strings"
"text/template"
exec "golang.org/x/sys/execabs"
"golang.org/x/tools/go/packages"
)

View File

@ -24,10 +24,10 @@ import (
"go/parser"
"go/token"
"os"
"os/exec"
"path/filepath"
"strings"
exec "golang.org/x/sys/execabs"
"golang.org/x/tools/go/ast/astutil"
)

View File

@ -20,10 +20,11 @@ package processtest_test
import (
"bytes"
"os"
"os/exec"
"path/filepath"
"strings"
"testing"
exec "golang.org/x/sys/execabs"
)
func TestPrograms(t *testing.T) {