From b2a9ab24f04885adb52faf6bdccb0bb7dfb3c187 Mon Sep 17 00:00:00 2001 From: v-mahabaleshwars <147705296+v-mahabaleshwars@users.noreply.github.com> Date: Tue, 3 Nov 2026 02:13:35 +0530 Subject: [PATCH] Clarify description of go-bin-path output and its fallback behavior (#803) * docs: clarify description of go-bin-path output and its fallback behavior * fix: add newline at end of action.yml for proper formatting * fix: remove unnecessary newline in action.yml * fix: add missing newline at end of action.yml --------- Co-authored-by: mahabaleshwars <147705296+mahabaleshwars@users.noreply.github.com> --- action.yml | 2 +- docs/advanced-usage.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index e66304c..ea563c4 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 5cc2543..a0d19a8 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -435,7 +435,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 |