go/src
Russ Cox 227fb116be cmd/go: clean up after 'go build' during 'go install'
If 'go install' (with no arguments, meaning the current directory)
succeeds, remove the executable written by 'go build', if present.
This avoids leaving a stale binary behind during a sequence like:

	go build
	<test, mostly works, make small change>
	go install

Before this CL, the current directory still has the stale binary
from 'go build'. If $PATH contains dot, running the name of
the program will find this stale binary instead of the new,
installed one.

Remove the 'go build' target during 'go install', both to clean
up the directory and to avoid accidentally running the stale binary.

Another way to view this CL is that it makes the go command
behave as if 'go install' is implemented by 'go build' followed by
moving the resulting binary to the install location.

See #9645 for discussion and objections.

Fixes #9645.

Change-Id: Ide109572f96bbb5a35be45dda17738317462a7d4
Reviewed-on: https://go-review.googlesource.com/10682
Reviewed-by: Rob Pike <r@golang.org>
2015-06-04 04:12:32 +00:00
..
archive archive/tar: terminate when reading malformed sparse files 2015-05-28 23:54:54 +00:00
bufio
builtin
bytes
cmd cmd/go: clean up after 'go build' during 'go install' 2015-06-04 04:12:32 +00:00
compress
container
crypto
database/sql
debug all: build and use go tool compile, go tool link 2015-05-21 17:32:03 +00:00
encoding encoding/gob: fix infinite recursion caused by ignoring recursive type 2015-06-01 18:42:29 +00:00
errors
expvar
flag flag: Fix up a package comment a bit. 2015-05-19 02:18:40 +00:00
fmt fmt: fix buffer underflow for negative integers 2015-06-02 13:55:40 +00:00
go cmd/go: make test.bash pass again 2015-06-03 20:33:30 +00:00
hash
html html/template: prevent panic when escaping actions involving chain nodes 2015-06-01 20:52:04 +00:00
image
index/suffixarray
internal internal/syscall/windows/registry: fix read overrun in GetStringsValue 2015-05-15 03:25:41 +00:00
io io: minor improvements to doc comment on WriteString. 2015-05-29 04:33:15 +00:00
log
math math/big: turn off debug mode 2015-06-03 22:08:17 +00:00
mime mime: fix names of examples 2015-06-01 22:20:58 +00:00
net net/http: set nosniff header when serving Error 2015-06-02 18:29:45 +00:00
os
path path: fix a typo in documentation of Split 2015-05-31 22:08:38 +00:00
reflect reflect: make PtrTo(FuncOf(...)) not crash 2015-05-16 00:51:05 +00:00
regexp regexp: suggest go doc, not godoc 2015-06-01 20:16:31 +00:00
runtime runtime: fix TestFixedGOROOT to properly restore the GOROOT env var after test 2015-06-03 23:33:48 +00:00
sort
strconv strconv: minor internal comment fix 2015-05-27 22:02:02 +00:00
strings strings: mention UTF-8 in the package comment. 2015-06-03 19:28:41 +00:00
sync
syscall syscall: don't run fcntl child process test on iOS 2015-05-15 16:41:12 +00:00
testing testing: fix typo 2015-05-12 23:39:00 +00:00
text text/template: refactor code to accomodate bi-state requirement for templates 2015-06-03 20:10:54 +00:00
time time: document that not all Unix time can be represented 2015-05-19 06:19:33 +00:00
unicode
unsafe
Make.dist
all.bash
all.bat
all.rc
androidtest.bash androidtest.bash: clean up stale GOROOT 2015-05-25 20:53:26 +00:00
bootstrap.bash
buildall.bash buildall.bash: exit 1 when make.bash fails 2015-05-17 01:40:33 +00:00
clean.bash
clean.bat
clean.rc
iostest.bash
make.bash
make.bat
make.rc
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc