github.com/tristanisham/sys@v0.0.0-20240326010300-a16cbabb7555/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  }