coreos/fleet — pull request #1050 by bcwaldon (2014-12-03 02:04:13+00:00)
Title: Fix searching for unit file in fleetctl when unit type not specified

Fix #1028. I'm sad about how much effort is required to write tests for this codepath.

The change from `go build` to `go install` is needed for environments that run with a readonly go library. On my system, I've unpacked the go source into `/opt/go` as root. Running `go install` as non-root results in this:

```
Building fleetctl...
go install runtime: open /opt/go/pkg/linux_amd64/runtime.a: permission denied
```

I have no idea what the `go install` tool is trying to do. Given that we clearly don't need to be "installing" fleetctl, `go build` is a fine solution to the problem.