golang.org/x/sys@v0.20.1-0.20240517151509-673e0f94c16d/execabs/execabs_go119.go (about)

     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  
     5  //go:build go1.19
     6  
     7  package execabs
     8  
     9  import (
    10  	"errors"
    11  	"os/exec"
    12  )
    13  
    14  func isGo119ErrDot(err error) bool {
    15  	return errors.Is(err, exec.ErrDot)
    16  }
    17  
    18  func isGo119ErrFieldSet(cmd *exec.Cmd) bool {
    19  	return cmd.Err != nil
    20  }