Skip to content

os/exec: Doesn't properly report exit code of a "is not recognized as an internal or external command" command #7850

@gopherbot

Description

@gopherbot

by Kusold:

What does 'go version' print? 1.2.1 windows/amd64

On Windows, run the attached .go file. The exitcode that is reported is a "1".
However when you run the attached .bat file, you will see that Windows reports this
error as a 9009.


What happened?
The exitcode that Go is reporting is "1".
The exitcode that Windows is reporting is 9009.

What should have happened instead?
Go should report 9009

Attachments:

  1. testGoCmdWindows.go (178 bytes)
  2. testWindowsExitCode.bat (23 bytes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions