exit status of "go build ./..."

121 views
Skip to first unread message

al...@kite.com

unread,
Jun 25, 2015, 6:34:46 PM6/25/15
to golan...@googlegroups.com
It appears that "go build ./..." always exits with a return code of 0. Is there a recommended way to determine whether any errors were encountered during the build?

For example, running "go build ./..." from a directory containing just a single file with syntax errors:

    $ go build ./...
    ... compile errors ...
    $ echo $?
    0

whereas running "go build ." gives:

    $ go build .
    ... compile errors ...
    $ echo $?
    1

Alex

Rob Pike

unread,
Jun 25, 2015, 6:40:36 PM6/25/15
to al...@kite.com, golan...@googlegroups.com
Please file an issue at golang.org/issue.

-rob


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages