You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import (
"fmt""golang.org/x/sys/execabs"
)
funcmain() {
fmt.Println(execabs.Command("this-command-does-not-exist").Start())
}
What did you expect to see?
An error message should complain that the executable was not found in the current PATH, or something along those lines. The os/exec equivalent code returns this error:
exec: "this-command-does-not-exist": executable file not found in $PATH
What did you see instead?
The error reported is:
this-command-does-not-exist resolves to executable in current directory (./this-command-does-not-exist)
(This is not true, there is no such file in the current directory)
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Go 1.20, via https://go.dev/play/
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?https://go.dev/play/
What did you do?
What did you expect to see?
An error message should complain that the executable was not found in the current PATH, or something along those lines. The
os/exec
equivalent code returns this error:What did you see instead?
The error reported is:
(This is not true, there is no such file in the current directory)
The text was updated successfully, but these errors were encountered: