execabs_go119.go 393 B

123456789101112131415161718192021
  1. // Copyright 2022 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. //go:build go1.19
  5. // +build go1.19
  6. package execabs
  7. import (
  8. "errors"
  9. "os/exec"
  10. )
  11. func isGo119ErrDot(err error) bool {
  12. return errors.Is(err, exec.ErrDot)
  13. }
  14. func isGo119ErrFieldSet(cmd *exec.Cmd) bool {
  15. return cmd.Err != nil
  16. }