diff options
| author | Michael Matloob <matloob@golang.org> | 2025-01-16 15:44:55 -0500 |
|---|---|---|
| committer | Michael Matloob <matloob@golang.org> | 2025-03-11 07:51:38 -0700 |
| commit | 73fea035bf1e4e68ef14995a389d4fd8df5c6a34 (patch) | |
| tree | f270eb7b35335d14ec61fb045eb645825abd41e2 /doc | |
| parent | a588c6fba6d411245d72b9e071eedc3b4d00a0c8 (diff) | |
| download | go-73fea035bf1e4e68ef14995a389d4fd8df5c6a34.tar.xz | |
cmd/go: allow symlinks of non-directory files in embed
We previously disallowed all non-regular files being embedded. This CL
relaxes the restriction a little: if the GODEBUG embedfollowsymlinks=1
is set, we allow the leaf files being embedded (not the directories
containing them) to be symlinks. The files pointed to by the symlinks
must still be regular files.
This will be used when a Bazel build action executing the Go command is
running in a symlink-based sandbox. It's not something we want to enable
in general for now, so it's behind a GODEBUG.
Fixes #59924
Change-Id: I895be14c12de55b7d1b663d81bdda1df37d54804
Reviewed-on: https://go-review.googlesource.com/c/go/+/643215
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/godebug.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/godebug.md b/doc/godebug.md index 650a8e20bf..f3ad820d3c 100644 --- a/doc/godebug.md +++ b/doc/godebug.md @@ -164,6 +164,11 @@ reverts to the pre-Go 1.25 behavior. This setting is fixed at program startup time, and can't be modified by changing the `GODEBUG` environment variable after the program starts. +Go 1.25 added a new `embedfollowsymlinks` setting that controls whether the +Go command will follow symlinks to regular files embedding files. +The default value `embedfollowsymlinks=0` does not allow following +symlinks. `embedfollowsymlinks=1` will allow following symlinks. + ### Go 1.24 Go 1.24 added a new `fips140` setting that controls whether the Go |
