From 027855e8d86f461b50946b006ea032d4b4a7d817 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 27 Jul 2022 14:36:05 -0400 Subject: os/exec: add GODEBUG setting to opt out of ErrDot changes The changes are likely to break users, and we need to make it easy to unbreak without code changes. For #43724. Fixes #53962. Change-Id: I105c5d6c801d354467e0cefd268189c18846858e Reviewed-on: https://go-review.googlesource.com/c/go/+/419794 Reviewed-by: Bryan Mills Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot Run-TryBot: Russ Cox --- src/os/exec/exec.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/os/exec/exec.go') diff --git a/src/os/exec/exec.go b/src/os/exec/exec.go index 57d18420bb..737aaab6a7 100644 --- a/src/os/exec/exec.go +++ b/src/os/exec/exec.go @@ -80,6 +80,11 @@ // log.Fatal(err) // } // +// Setting the environment variable GODEBUG=execerrdot=0 +// disables generation of ErrDot entirely, temporarily restoring the pre-Go 1.19 +// behavior for programs that are unable to apply more targeted fixes. +// A future version of Go may remove support for this variable. +// // Before adding such overrides, make sure you understand the // security implications of doing so. // See https://go.dev/blog/path-security for more information. -- cgit v1.3