"go/parser"
"go/token"
"go/types"
- exec "internal/execabs"
"io"
"log"
"os"
+ "os/exec"
"path/filepath"
"regexp"
"runtime"
import (
"errors"
"fmt"
- exec "internal/execabs"
"internal/goversion"
"io/fs"
"log"
"os"
+ "os/exec"
"path/filepath"
"runtime"
"strconv"
"go/ast"
"go/printer"
"go/token"
- exec "internal/execabs"
"internal/xcoff"
"io"
"os"
+ "os/exec"
"path/filepath"
"regexp"
"sort"
"bytes"
"fmt"
"go/token"
- exec "internal/execabs"
"io/ioutil"
"os"
+ "os/exec"
)
// run runs the command argv, feeding in stdin on standard input.
"cmd/internal/src"
"fmt"
"html"
- exec "internal/execabs"
"io"
"os"
+ "os/exec"
"path/filepath"
"strconv"
"strings"
"go/ast"
"go/parser"
"go/token"
- exec "internal/execabs"
"io"
"os"
+ "os/exec"
"path"
"path/filepath"
"runtime"
package main
import (
- exec "internal/execabs"
"os"
+ "os/exec"
"strings"
)
if strings.HasPrefix(line, `import "`) || strings.HasPrefix(line, `import . "`) ||
inBlock && (strings.HasPrefix(line, "\t\"") || strings.HasPrefix(line, "\t. \"") || strings.HasPrefix(line, "\texec \"")) {
line = strings.Replace(line, `"cmd/`, `"bootstrap/cmd/`, -1)
- // During bootstrap, must use plain os/exec.
- line = strings.Replace(line, `exec "internal/execabs"`, `"os/exec"`, -1)
for _, dir := range bootstrapDirs {
if strings.HasPrefix(dir, "cmd/") {
continue
import (
"bytes"
"fmt"
- exec "internal/execabs"
"log"
"os"
+ "os/exec"
"path/filepath"
"regexp"
"strings"
"go/ast"
"go/parser"
"go/token"
- exec "internal/execabs"
"os"
+ "os/exec"
"path/filepath"
"reflect"
"runtime"
"context"
"flag"
"fmt"
- exec "internal/execabs"
"log"
"os"
+ "os/exec"
"strings"
"sync"
"bytes"
"context"
"fmt"
- exec "internal/execabs"
"io"
urlpkg "net/url"
"os"
+ "os/exec"
"path/filepath"
"regexp"
"runtime"
"fmt"
"go/parser"
"go/token"
- exec "internal/execabs"
"io"
"log"
"os"
+ "os/exec"
"path/filepath"
"regexp"
"strconv"
"bytes"
"crypto/sha256"
"fmt"
- exec "internal/execabs"
"io"
"io/fs"
"os"
+ "os/exec"
"path/filepath"
"strings"
"sync"
"bytes"
"errors"
"fmt"
- exec "internal/execabs"
"io"
"io/fs"
"net/url"
"os"
+ "os/exec"
"path/filepath"
"sort"
"strconv"
import (
"bytes"
"flag"
- exec "internal/execabs"
"log"
"os"
+ "os/exec"
"strings"
"testing"
"text/template"
"cmd/go/internal/base"
"encoding/json"
"fmt"
- exec "internal/execabs"
+ "os/exec"
"regexp"
"sort"
)
"errors"
"fmt"
"go/build"
- exec "internal/execabs"
"io"
"io/fs"
"os"
+ "os/exec"
"path"
"path/filepath"
"regexp"
import (
"context"
"fmt"
- exec "internal/execabs"
"os"
+ "os/exec"
"os/signal"
"sort"
"strings"
"bytes"
"errors"
"fmt"
- exec "internal/execabs"
"internal/lazyregexp"
"internal/singleflight"
"io/fs"
"log"
urlpkg "net/url"
"os"
+ "os/exec"
"path/filepath"
"regexp"
"strconv"
"errors"
"flag"
"fmt"
- exec "internal/execabs"
"log"
"os"
+ "os/exec"
"path/filepath"
"strings"
"errors"
"fmt"
"go/build"
- exec "internal/execabs"
"os"
+ "os/exec"
"path/filepath"
"runtime"
"strconv"
import (
"bytes"
"fmt"
- exec "internal/execabs"
"os"
+ "os/exec"
"strings"
"cmd/go/internal/base"
"encoding/json"
"errors"
"fmt"
- exec "internal/execabs"
"internal/lazyregexp"
"io"
"io/fs"
"log"
"math/rand"
"os"
+ "os/exec"
"path/filepath"
"regexp"
"runtime"
import (
"fmt"
- exec "internal/execabs"
"os"
+ "os/exec"
"path/filepath"
"strings"
"sync"
"bytes"
"flag"
"fmt"
- exec "internal/execabs"
"internal/txtar"
"io/fs"
"log"
"os"
+ "os/exec"
"path/filepath"
"strings"
)
package browser
import (
- exec "internal/execabs"
"os"
+ "os/exec"
"runtime"
"time"
)
"errors"
"fmt"
"internal/buildcfg"
- exec "internal/execabs"
+ "os/exec"
"sort"
"strconv"
"strings"
"bytes"
"errors"
"fmt"
- exec "internal/execabs"
"io/ioutil"
"os"
+ "os/exec"
"strings"
)
package ld
import (
- exec "internal/execabs"
"os"
+ "os/exec"
"path/filepath"
"syscall"
)
"encoding/binary"
"fmt"
"internal/buildcfg"
- exec "internal/execabs"
"io"
"io/ioutil"
"log"
"os"
+ "os/exec"
"path/filepath"
"runtime"
"strings"
import (
"flag"
"fmt"
- exec "internal/execabs"
"io"
"os"
+ "os/exec"
"cmd/internal/test2json"
)
import (
"bufio"
"fmt"
- exec "internal/execabs"
"internal/trace"
"io"
"net/http"
"os"
+ "os/exec"
"path/filepath"
"runtime"
"sort"
"go/doc"
"go/token"
"internal/buildcfg"
- exec "internal/execabs"
"internal/goroot"
"internal/goversion"
"io"
"io/fs"
"io/ioutil"
"os"
+ "os/exec"
pathpkg "path"
"path/filepath"
"runtime"
log !< FMT;
- OS, FMT
- < internal/execabs;
-
- OS, internal/execabs
- < internal/goroot;
-
# Misc packages needing only FMT.
FMT
< html,
+ internal/goroot,
mime/quotedprintable,
net/internal/socktest,
net/url,
import (
"bufio"
"go/types"
- exec "internal/execabs"
"os"
+ "os/exec"
"path/filepath"
"strings"
)
"go/parser"
"go/token"
"go/types"
- exec "internal/execabs"
"io"
"os"
+ "os/exec"
"path/filepath"
"strings"
"sync"
+++ /dev/null
-// Copyright 2021 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package execabs is a drop-in replacement for os/exec
-// that requires PATH lookups to find absolute paths.
-// That is, execabs.Command("cmd") runs the same PATH lookup
-// as exec.Command("cmd"), but if the result is a path
-// which is relative, the Run and Start methods will report
-// an error instead of running the executable.
-package execabs
-
-import (
- "context"
- "os/exec"
-)
-
-var ErrNotFound = exec.ErrNotFound
-
-type (
- Cmd = exec.Cmd
- Error = exec.Error
- ExitError = exec.ExitError
-)
-
-func LookPath(file string) (string, error) {
- return exec.LookPath(file)
-}
-
-func CommandContext(ctx context.Context, name string, arg ...string) *exec.Cmd {
- return exec.CommandContext(ctx, name, arg...)
-}
-
-func Command(name string, arg ...string) *exec.Cmd {
- return exec.Command(name, arg...)
-}
package goroot
import (
- exec "internal/execabs"
"os"
+ "os/exec"
"path/filepath"
"strings"
"sync"