Upgrade to Go 1.22.1

Closes #12250
This commit is contained in:
Bjørn Erik Pedersen
2024-03-14 20:25:16 +01:00
parent b1f8676347
commit 57206e7274
10 changed files with 114 additions and 56 deletions

View File

@@ -6,6 +6,7 @@ package testenv
import (
"context"
"errors"
"fmt"
"os"
"os/exec"
@@ -60,6 +61,13 @@ func tryExec() error {
// may as well use the same path so that this branch can be tested without
// an ios environment.
if !testing.Testing() {
// This isn't a standard 'go test' binary, so we don't know how to
// self-exec in a way that should succeed without side effects.
// Just forget it.
return errors.New("can't probe for exec support with a non-test executable")
}
// We know that this is a test executable. We should be able to run it with a
// no-op flag to check for overall exec support.
exe, err := os.Executable()