fix: GITHUB_ENV and GITHUB_OUTPUT allow larger lines (#5028)
This commit is contained in:
@@ -286,6 +286,7 @@ func readArgsFile(file string, split bool) []string {
|
||||
}
|
||||
}()
|
||||
scanner := bufio.NewScanner(f)
|
||||
scanner.Buffer(nil, 1024*1024*1024) // increase buffer to 1GB to avoid scanner buffer overflow
|
||||
for scanner.Scan() {
|
||||
arg := os.ExpandEnv(strings.TrimSpace(scanner.Text()))
|
||||
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -523,6 +523,7 @@ func (rc *RunContext) UpdateExtraPath(ctx context.Context, githubEnvPath string)
|
||||
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()
|
||||
@@ -537,7 +538,7 @@ func (rc *RunContext) UpdateExtraPath(ctx context.Context, githubEnvPath string)
|
||||
rc.addPath(ctx, line)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
return s.Err()
|
||||
}
|
||||
|
||||
// stopJobContainer removes the job container (if it exists) and its volume (if it exists)
|
||||
|
||||
Reference in New Issue
Block a user