fix: GITHUB_ENV and GITHUB_OUTPUT allow larger lines (#5028)

This commit is contained in:
ChristopherHX
2025-06-11 19:36:11 +02:00
committed by GitHub
parent 1622c218d5
commit 67e332e838
3 changed files with 5 additions and 2 deletions

View File

@@ -25,6 +25,7 @@ func parseEnvFile(e Container, srcPath string, env *map[string]string) common.Ex
return err
}
s := bufio.NewScanner(reader)
s.Buffer(nil, 1024*1024*1024) // increase buffer to 1GB to avoid scanner buffer overflow
firstLine := true
for s.Scan() {
line := s.Text()
@@ -63,6 +64,6 @@ func parseEnvFile(e Container, srcPath string, env *map[string]string) common.Ex
}
}
env = &localEnv
return nil
return s.Err()
}
}