maskErrDotCmd reverts the behavior of osexec.Cmd to what it was before go1.19 specifically set the Err field to nil (LookPath returns a new error when the file is resolved to the current directory.
(cmd *osexec.Cmd)
| 163 | // specifically set the Err field to nil (LookPath returns a new error when the file |
| 164 | // is resolved to the current directory. |
| 165 | func maskErrDotCmd(cmd *osexec.Cmd) *osexec.Cmd { |
| 166 | cmd.Err = maskErrDot(cmd.Err) |
| 167 | return cmd |
| 168 | } |
| 169 | |
| 170 | func maskErrDot(err error) error { |
| 171 | if err != nil && errors.Is(err, osexec.ErrDot) { |
no test coverage detected