commit | 4fbd06dc7b1b8fb665293399a2b6d5326435512f | [log] [tgz] |
---|---|---|
author | Ian Lance Taylor <iant@golang.org> | Wed Feb 20 15:46:32 2019 -0800 |
committer | Ian Lance Taylor <iant@golang.org> | Fri Feb 22 00:40:38 2019 +0000 |
tree | e119031fc1dcf9e2dd5d9ec6873bcca97903b151 | |
parent | 43e458ab704e04cdf347f3e74e0b0eff3de00a3d [diff] |
cmd/go: remove work directory on usage error Backport https://golang.org/cl/163237 from the master library: Ensure that cmd/go consistently calls base.Exit rather than os.Exit, so that we don't incorrectly leave the work directory around on exit. Test this by modifying the testsuite to run all the tests with TMPDIR set to a temporary directory, and then check that no files are left behind in that temporary directory. Adjust a couple of tests to make this approach work. Updates https://gcc.gnu.org/PR89406 Change-Id: I8794b7b2f1346e7af84f3300ef420d4c9d0b5fb2 Reviewed-on: https://go-review.googlesource.com/c/163198 Reviewed-by: Than McIntosh <thanm@google.com>