Try to figure out attribute checker problem (#33901)

For #31600
This commit is contained in:
wxiaoguang 2025-03-18 02:59:34 +08:00 committed by GitHub
parent fdaf1cca65
commit 9d7c02f9f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 96 additions and 15 deletions

View file

@ -46,6 +46,7 @@ type Command struct {
args []string
globalArgsLength int
brokenArgs []string
cmd *exec.Cmd // for debug purpose only
}
func logArgSanitize(arg string) string {
@ -314,6 +315,7 @@ func (c *Command) run(ctx context.Context, skip int, opts *RunOpts) error {
startTime := time.Now()
cmd := exec.CommandContext(ctx, c.prog, c.args...)
c.cmd = cmd // for debug purpose only
if opts.Env == nil {
cmd.Env = os.Environ()
} else {