diff --git a/action.yml b/action.yml index 79299e5..6ca1442 100644 --- a/action.yml +++ b/action.yml @@ -31,7 +31,7 @@ outputs: GOBIN: description: 'The value of `go env GOBIN`.' go-bin-path: - description: 'The base Go binary directory: `GOBIN`, otherwise `bin` under the first `GOPATH` entry.' + description: 'The base Go binary directory: the `GOBIN` value, otherwise `bin` under the first `GOPATH` entry when `GOBIN` is empty.' GOROOT: description: 'The value of `go env GOROOT`.' GOCACHE: diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 0e3efa5..64deda7 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -431,7 +431,7 @@ Once Go is on the `PATH`, the action exposes the most commonly needed `go env` v | --- | --- | | `GOPATH` | Go workspace root; `bin` and `pkg/mod` live under it | | `GOBIN` | Go 1.27+ reports an implicit `$GOPATH/bin` default; earlier releases are empty unless `GOBIN` is set | -| `go-bin-path` | The base Go binary directory (`GOBIN` or `$GOPATH/bin`), using the first `GOPATH` entry. Cross-compiled binaries go one level deeper, in `$GOPATH/bin/$GOOS_$GOARCH` | +| `go-bin-path` | Uses `GOBIN`, or falls back to `bin` under the first `GOPATH` entry when `GOBIN` is empty. It normally matches `GOBIN` on Go 1.27+; the fallback is a convenience for earlier releases. When `GOBIN` is not explicitly set (in the environment or via `go env -w`), cross-compiled binaries go one level deeper, in `$GOPATH/bin/${GOOS}_${GOARCH}` | | `GOROOT` | Installation directory of the Go toolchain in use | | `GOCACHE` | Build cache directory | | `GOMODCACHE` | Module cache directory |