-
Notifications
You must be signed in to change notification settings - Fork 18k
os/exec: does not report error for exec.Command when the file does not exist #23437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Go does not report any error because you are ignoring the error from I am going to close this issue as this appears to be a request for support, not a bug report. We only use our bug tracker for tracking bugs and tracking proposals going through the Proposal Process. Please see https://golang.org/wiki/Questions for good places to ask questions. |
@davecheney , well, the cmd.Start() still does not report any error, but cmd.Wait() does. It looks weird, why do we just report it at the begining, in Start but not in Wait? |
If |
@as, yes, Start returns an error if the process fails to start. Wait returns an error if the process fails to finish. It doesn't know that Let's move discussion to golang-nuts. |
My bad, the title of the issue made me think that |
go 1.8.4
In running an exec.Command against files, Go does not report any error when the file does not exist. A simple example as below:
``
``
Both err1 and err2 are nil, and no error is shown. It looks like the program runs successfully, but actually not.
The text was updated successfully, but these errors were encountered: