1
0
mirror of https://github.com/golang/go synced 2024-11-22 04:34:39 -07:00

use slices.Clip

This commit is contained in:
Mauri de Souza Meneguzzo 2024-06-27 20:53:04 -03:00
parent d33e2638d6
commit 9986537cad
No known key found for this signature in database
GPG Key ID: 20F8BD208210BEF4

View File

@ -14,6 +14,7 @@ import (
"os"
"os/exec"
"reflect"
"slices"
"strings"
"sync"
@ -211,7 +212,7 @@ func RunStdin(cmdline []string) {
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
env := cfg.OrigEnv[:len(cfg.OrigEnv):len(cfg.OrigEnv)]
env := slices.Clip(cfg.OrigEnv)
env = AppendPATH(env)
cmd.Env = env
StartSigHandlers()